Problem with playerid's ...
#4

Quote:
Originally Posted by mansonh
Quote:

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

I can't see why it jails the wrong person.
However there were a number of places where you were using playerid where you should have been using ID

pawn Код:
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(ID,VictimName,MAX_PLAYER_NAME);
 new Message[128]; format(Message,128,"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",ID);
 pInfo[ID][Jail]=JTime;
 JailPosCheck = SetTimerEx("JailedPlayerPosCheck",1000,true,"i",ID);
 }
 return 1;
 }
Thats only on the formatting, i know that. But thanks, does any one know why this command freaking pisses me off ? Somethings wrong with that, i know it.
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: 1 Guest(s)