PHP код:
if (strcmp("/jail", cmdtext, true, 10) == 0)
{
new string[128];
new ID;
new cmdreason[128];
new pname[24];
GetPlayerName(playerid,pname,sizeof(pname));
if(sscanf(params, "uis[100]", ID, cmdreason))
{
SendClientMessage(playerid,-1,"Use: /jail (Pseudo/ID) (Reason)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"Disconnected player.");
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
SendClientMessage(ID, -1, "You have been jailed by : %s",pname);
SetPlayerPos(ID, YOUR JAIL POS);
SetPlayerInterior(ID, YOUR INTERIOR);
return 1;
}
Hope this helps.