Quantcast
Channel: Forum VeryGames
Viewing all articles
Browse latest Browse all 5196

plugin !afk

$
0
0
Bonjours,

J'ai un petit problème pour l'un de mes plugin !afk que g trouver sur un roleplay :) il ne ce compille pas car il y a 4 erreurs.

Code:

#include <sdktools>
#include <cstrike>
#include <smlib>
#include <sdkhooks>
#include <sourcemod>

new bool:AfkMode[66];
new Float:Afk_VecPos[66][3];
new Handle:AfkTimer[66];


public OnPluginStart()

{
    RegConsoleCmd("sm_afk", Command_Afk);
}

public Action:Command_Afk(client, args)
{
    if (IsClientConnected(client))
    {
        Afk(client);
    }
    return Action:0;
}

Afk(client)
{
    decl String:AfkName[64];
    decl String:Name[64];
    if (!AfkMode[client][0][0]);
    {
        AfkMode[client] = 1;
        PrintToChatAll("%N est maintenant absent.", client);
        PrintToChat(client, "Vous etes maintenant absent.");
        GetClientName(client, Name, 64);
        Format(AfkName, 64, "<AFK>%s", Name);
        SetClientName(client, AfkName);
    }
    else
    {
        AfkMode[client] = 0;
        PrintToChatAll("%N n'est plus absent.", client);
        PrintToChat(client, "Vous n'etes plus absent.");
        GetClientName(client, Name, 64);
        ReplaceString(Name, 64, "<AFK>", "", true);
        SetClientName(client, Name);
    }
    return 0;
}

public Action:Afk_Timer(Handle:timer, client2)
{
    new client = 1;
    while (client < MaxClients)
    {
        new var1;
        if (IsClientInGame(client))
        {
            decl Float:TempVec[3];
            if (GetEntPropEnt(client, PropType:0, "m_hVehicle", 0) != -1)
            {
                GetEntPropVector(GetEntPropEnt(client, PropType:0, "m_hVehicle", 0), PropType:0, "m_vecOrigin", TempVec, 0);
            }
            else
            {
                GetEntPropVector(client, PropType:0, "m_vecOrigin", TempVec, 0);
            }
            new var2;
            if (Afk_VecPos[client][0][0][0] == TempVec[0])
            {
                if (AfkMode[client][0][0])
                {
                }
                else
                {
                    decl String:AfkName[64];
                    decl String:Name[64];
                    PrintToChatAll("%N est maintenant absent.", client);
                    PrintToChat(client, "Vous etes maintenant absent.");
                    AfkMode[client] = 1;
                    GetClientName(client, Name, 64);
                    Format(AfkName, 64, "<AFK>%s", Name);
                    SetClientName(client, AfkName);
                }
            }
            if (GetEntPropEnt(client, PropType:0, "m_hVehicle", 0) != -1)
            {
                GetEntPropVector(GetEntPropEnt(client, PropType:0, "m_hVehicle", 0), PropType:0, "m_vecOrigin", Afk_VecPos[client][0][0], 0);
                client++;
            }
            else
            {
                GetEntPropVector(client, PropType:0, "m_vecOrigin", Afk_VecPos[client][0][0], 0);
                client++;
            }
            client++;
        }
        client++;
    }
    return Action:0;
}

Et pas besoin de mètre des commentaires a la c** pour dire que sa vien d'un rp ou autre :) MERCI

Viewing all articles
Browse latest Browse all 5196

Trending Articles


Vimeo 10.7.1 by Vimeo.com, Inc.


“Hanggang s apag tanda natin”


Pokemon para colorear


Sapos para colorear


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 11.6.0 by Vimeo.com, Inc.


Vimeo 11.8.1 by Vimeo.com, Inc.


FORTUITOUS EVENT


Long Distance Relationship Tagalog Love Quotes


Top 100 Tagalog Love Quotes Collections Online


Girasoles para colorear


Tropa Quotes


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Vimeo 11.5.1 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


UPDATE SC IDOL: TWO BECOME ONE


KASAMBAHAY BILL IN THE HOUSE