11.01.2018, 20:41
I don't know why but my command don't stamp the SendClientMessageToAll, i don't see any problem (i tried to print with printf and it works on terminal but not in game)
pawn Код:
CMD:ajail(playerid, params[])
{
new target, time, string[500], reason[500];
if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, ""RED"[!] "WHITE"Non sei autorizzato ad utilizzare questo comando.");
if(sscanf(params, "uds[500]", target, time, reason)) return SendClientMessage(playerid, -1, ""LBLUE"[!] "WHITE"Uso: "LBLUE"/ajail "WHITE"[ID/Nome] [minuti] [motivo]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, ""RED"[!] "WHITE"Questo giocatore non e' online.");
format(string, sizeof(string), ""GREEN"[!] "YELLOW"%s "WHITE"e' stato jailato da "LBLUE"%s "YELLOW"%s "WHITE"per "LBLUE"%d "WHITE"minuti. "RED"Motivo"WHITE": %s", GetName(target), AdminLevel(playerid), GetName(playerid), time, reason);
SendClientMessageToAll(-1, string);
SetPlayerPos(target, 2525.1736, -1673.8074, 14.8601);
SetPlayerVirtualWorld(target, 0);
SetPlayerHealth(target, 5000.0);
ResetPlayerWeapons(playerid);
Jailed[target] = 1;
InJailTime[target] = time*60;
return 1;
}