19.10.2012, 04:30
Quote:
Is there anything even more simple? that i wont need an include, like a simple /jail [id] [time] [reason]
|
Anyway, you wish it to includeless, so.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/jail", true, 5)) { if (IsPlayerAdmin(playerid)) { if(!strlen(cmdtext[6])) { SendClientMessage(playerid, COLOR_WHITE, "Usage: /jail [playerid]"); return 1; } new ID = strval(cmdtext[6]); new strv[170]; if(IsPlayerConnected(ID)) { format(strv, 170, "~ You have been jailed"); SendClientMessage(ID,COLOR_WHITE, strv); SetPlayerPos(ID, 264.8763,81.9862,1001.0390); SetPlayerInterior(ID, 6); } } return SendClientMessage(playerid, COLOR_WHITE, "Your not rcon admin!"); } return 0; }