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.
Et pas besoin de mètre des commentaires a la c** pour dire que sa vien d'un rp ou autre :) MERCI
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;
}