Bonsoir j'ai trouver ce code sur le net et il se compile parfaitement mais une fois sur le serveur il ne fonctionne pas :( si quelqu'un c'est d'ou vien le probleme ;)
#include <sdktools>#include <sourcemod>
public Plugin:myinfo =
{
name = "lightChooser",
author = "SpheX",
description = "",
version = "1.0.0",
url = "http://www.sphex.fr/"
}
public OnPluginStart()
{
HookEvent("round_start", RoundStart);
}
public RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new random;
new bool:found = false;
while (!found)
{
random = GetRandomInt(1, 64);
if (IsClientInGame(random) && IsPlayerAlive(random) && GetClientTeam(random) == 3)
{
found = true;
PrintToChatAll("\x04[JailMod] : Le joueur %N est maintenant le chef des gardiens.", random);
}
}
}
Citation:
#include <sdktools>#include <sourcemod>
public Plugin:myinfo =
{
name = "lightChooser",
author = "SpheX",
description = "",
version = "1.0.0",
url = "http://www.sphex.fr/"
}
public OnPluginStart()
{
HookEvent("round_start", RoundStart);
}
public RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new random;
new bool:found = false;
while (!found)
{
random = GetRandomInt(1, 64);
if (IsClientInGame(random) && IsPlayerAlive(random) && GetClientTeam(random) == 3)
{
found = true;
PrintToChatAll("\x04[JailMod] : Le joueur %N est maintenant le chef des gardiens.", random);
}
}
}