05.04.2015, 16:24
My /freeze command works, but it closes the server? but other cmds work fine..
Код:
CMD:freeze(playerid, params[])
{
new string[128], targetid, tname[MAX_PLAYER_NAME+1], pname[MAX_PLAYER_NAME+1];
if(pInfo[playerid][Admin] == 0) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You're not an administrator!");
GetPlayerName(playerid, pname, sizeof(pname)), GetPlayerName(targetid, tname, sizeof(tname));
TogglePlayerControllable(targetid, 0);
format(string, sizeof(string), " You have frozen %s.", pname);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), " Administrator %s has freezed you.", tname);
SendClientMessage(targetid, COLOR_GREY, string);
return 1;
}


