13.02.2010, 21:55
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. |
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;
}