Originally Posted by CalgonX
Paste your code, as I'm not able to telepathically communicate with you and your script.
|
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38)
{
Ban(playerid);
}
return 1;
}
Originally Posted by MadeMan
Use OnPlayerUpdate.
pawn Код:
|
new string[256];
new giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
new arma = GetPlayerWeapon(playerid);
//new ammo = GetPlayerAmmo(playerid);
if(arma == 1 && pArmaId1[playerid] == 0)
{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLevel] = -999;
Ban(playerid);
}
else if(arma == 2 && pArmaId2[playerid] == 0)
{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLevel] = -999;
Ban(playerid);
}
else if(arma == 3 && pArmaId3[playerid] == 0)
{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLevel] = -999;
Ban(playerid);
}
else if(arma == 4 && pArmaId4[playerid] == 0)
{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLevel] = -999;
Ban(playerid);
}
else if(arma == 5 && pArmaId5[playerid] == 0)
{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLevel] = -999;
Ban(playerid);
}
............etc
new PlayerSpawned[MAX_PLAYERS];
public OnPlayerConnect(playerid) { PlayerSpawned[playerid] = 0; return 1; } public OnPlayerSpawn(playerid) { PlayerSpawned[playerid] = 1; return 1; }
if(PlayerSpawned[i] == 1)
Originally Posted by ReteLikker
i had same problem
put on top Код:
new PlayerSpawned[MAX_PLAYERS]; Код:
public OnPlayerConnect(playerid) { PlayerSpawned[playerid] = 0; return 1; } public OnPlayerSpawn(playerid) { PlayerSpawned[playerid] = 1; return 1; } Код:
if(PlayerSpawned[i] == 1) |