/freeze command crashing my script?
#5

Or that :P
Command:
pawn Код:
command(freeze, playerid, params[])
{
    new id, string[128];
    if(Player[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, RED, "You are not allowed to use this command");
    if(sscanf(params, "d", id)) return SendClientMessage(playerid, WHITE, "USAGE: /freeze [playerid]");
    TogglePlayerControllable(id, 0);
    format(string, sizeof(string), "AdmCmd: %s has been frozen by %s", pName(id), pName(playerid));
    SendClientMessageToAll(ADMINORANGE, string);
    return 1;
}
Somewhere in ur script:
pawn Код:
stock pName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
Reply


Messages In This Thread
/freeze command crashing my script? - by Kyle_Olsen - 04.02.2011, 05:37
Re: /freeze command crashing my script? - by HyperZ - 04.02.2011, 05:43
Re: /freeze command crashing my script? - by Kyle_Olsen - 04.02.2011, 05:46
Re: /freeze command crashing my script? - by MrDeath537 - 04.02.2011, 06:45
Re: /freeze command crashing my script? - by HyperZ - 04.02.2011, 07:16
Re: /freeze command crashing my script? - by Kyle_Olsen - 04.02.2011, 12:29

Forum Jump:


Users browsing this thread: 1 Guest(s)