Problem with playerid's ...
#1

Hey, everyone, i have one problem, when i test with my friend my script theres nor warnings when compiled, but when we play i use command for ex. /jail ID TIME REASON it jails wrong player, not me, but my friend. I typed IDS correctly (i know how tu use commands lol)


Code:

Код:

dcmd_jail(playerid,params[])
 {
 if(pInfo[playerid][AdminLevel] > 0)
 {
 #pragma unused params
 new ID, OBTime, Reason[30];
 if(sscanf(params,"iis",ID,OBTime,Reason))return SendClientMessage(playerid,GREY," Usage: /jail ID Minutes Reason");
 new AdminName[MAX_PLAYER_NAME]; GetPlayerName(playerid,AdminName,MAX_PLAYER_NAME);
 new VictimName[MAX_PLAYER_NAME]; GetPlayerName(playerid,VictimName,MAX_PLAYER_NAME);
 new Message[100]; format(Message,100,"Admin command: %s jailed [ID:%d]%s, for: %dmins. (Reason: %s )",AdminName,ID,VictimName,OBTime,Reason);
 SendClientMessageToAll(RED,Message);
 PlayersAtJail++;
 SetPlayerInterior(ID, 10);
 SetPlayerPos(ID , 215.1641, 110.5463, 999.0156);
 new JTime = OBTime*60000;
 SetTimerEx("JailRelease" , JTime, false,"i",playerid);
 pInfo[ID][Jail]=JTime;
 JailPosCheck = SetTimerEx("JailedPlayerPosCheck",1000,true,"i",playerid);
 }
 return 1;
 }
Or if i want to unjail my self, it unjails other player... fucking weard things going on :O
Reply


Messages In This Thread
Problem with playerid's ... - by Universal - 13.02.2010, 18:57
Re: Problem with playerid's ... - by Universal - 13.02.2010, 20:18
Re: Problem with playerid's ... - by mansonh - 13.02.2010, 21:55
Re: Problem with playerid's ... - by Universal - 14.02.2010, 06:45
Re: Problem with playerid's ... - by mansonh - 14.02.2010, 18:06

Forum Jump:


Users browsing this thread: 5 Guest(s)