problem with jail command
#1

hi
Quote:

dcmd_jail(playerid,params[])
{
new cop[64],otherid,otherid2[64],msgcop[128];
new tmp[256], tmp2[256],Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
otherid= strval(tmp);
InJail[otherid]++;
if(!strlen(tmp))return SendClientMessage(playerid,0x33CCFFAA ,"USE: /jail [playerid]");
if(!IsNumeric(tmp)) return SendClientMessage(playerid,red,"[playerid]");
if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid,red,"Invalid id!");
if(otherid> 32) return SendClientMessage(playerid,red ,"Invalid id!");
GetPlayerName(playerid,cop[playerid],64);
GetPlayerName(otherid,otherid2[playerid],64);
format(msgcop,sizeof(msgcop)," %s[%d]has been jailed by %s[%d]",cop[playerid],playerid,otherid2[playerid],otherid);
SendClientMessageToAll(BLUE,msgcop);
SetPlayerPos(otherid,197.6661,173.8179,1003.0234);
SetPlayerInterior(otherid,3);
SetTimerEx("jailed",180000,false,"i",otherid);
ResetPlayerWeapons(otherid);
}
return 1;
}

i want add a reason because the player has been jailed but I don't know how to do that

help please

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)