Freeze Command.
#1

Hi Niggas,I have made freeze command i have add GameTextForPlayer and SendClientMessage But In Game The message doesn't comes wtf is this please help me.
This Is My Code:
Tell me whats mistake in this script
PHP код:
CMD:freeze(playerid,params[])
{
    new 
TargetID;
    if(!
IsPlayerAdmin(playerid))
    {
    
SendClientMessage(playerid,COLOR_ERROR,"Unknown Command! Use /cmds For Available Commands.");
    return 
1;
    }
     if(
sscanf(params"u"TargetID))
    {
    
SendClientMessage(playeridCOLOR_ERROR"USAGE: /freeze (Name/ID)");
    return 
1;
    }
    if(!
IsPlayerConnected(TargetID) || TargetID == INVALID_PLAYER_ID)
    {
    
SendClientMessage(playeridCOLOR_ERROR"That Player Is Not Connected.");
    return 
1;
    }
    if(
IsPlayerNPC(TargetID))
    {
    
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Freeze a BOT.");
    return 
1;
    }
    
SendClientMessageToAll(COLOR_ADMIN,"Admin Freeze %s(%d) Has Been Freezed By An Admin.");
    
GameTextForPlayer(TargetID,"~r~Freezed By An ~h~~p~Admin",4500,4);
    
TogglePlayerControllable(TargetID0);
    return 
1;

Reply
#2

Try this:
pawn Код:
new string[144], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "Admin Freeze %s(%d) Has Been Freezed By An Admin.", name, playerid);
SendClientMessageToAll(COLOR_ADMIN, string);
Reply
#3

Deleted.
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Try this:
pawn Код:
new string[144], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "Admin Freeze %s(%d) Has Been Freezed By An Admin.", name, playerid);
SendClientMessageToAll(COLOR_ADMIN, string);
Thanks You Very Much I Did It
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)