20.07.2009, 11:48
first change the "SetTimer("jailcount",5000,0);" by "SetTimerEx("jailcount",5000,0, "i", playerid);"
second change the "public JailCount(time)" by public JailCount(playerid, time)"
and try
second change the "public JailCount(time)" by public JailCount(playerid, time)"
and try
pawn Код:
if (strcmp(cmd,"/ajail", true,5) == 0)
{
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, thecolor, "USAGE: bla bla"); return 1; }
id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_LIGHTRED, "[ ! ] That player isn't active.");
new time = strval(tmp);
{
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, thecolor, "USAGE: bla bla"); return 1; }
Jail(id,time);
GetPlayerName(playerid, Aname, sizeof(Aname));
GetPlayerName(playerid, Idname, sizeof(Idname));
format(string,sizeof(string), "[ ! ] You have been jailed by %s for %d sec ! ",Aname,time);
SendClientMessage(id,COLOR_LIGHTRED, string);
format(string,sizeof(string), "[ ! ] You have jailed %s for %d sec ! ",id,time);
SendClientMessage(playerid,COLOR_LIGHTRED, string);
}