What the problem?!
#1

Код:
CMD:healme(playerid,params[])
{
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  SetPlayerHealth(playerid, 100.0);
  SetPlayerArmour(playerid, 100.0);
  new h_msg[100];
  format(h_msg,sizeof (h_msg),"Administrator %s has healed you!",pName);
  SCMA(RED, h_msg);
  return 1;
}
PHP код:
C:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(95) : error 076syntax error in the expression, or invalid function call 
Reply
#2

Try something normal like this:
pawn Код:
CMD:healme(playeris, params[])
{
    if (IsPlayerAdmin(playerid))
    {
        SetPlayerHealth(playerid, 100.0);
        SetPlayerArmour(playerid, 100.0);
       
        SendClientMessage(playerid, -1, "U got healed.");
    }
    return 1;
}
You're healing yourself, so, you don't need to send a message with your name.
Reply
#3

Quote:
Originally Posted by Willian_Luigi
Посмотреть сообщение
Try something normal like this:
pawn Код:
CMD:healme(playeris, params[])
{
    if (IsPlayerAdmin(playerid))
    {
        SetPlayerHealth(playerid, 100.0);
        SetPlayerArmour(playerid, 100.0);
       
        SendClientMessage(playerid, -1, "U got healed.");
    }
    return 1;
}
You're healing yourself, so, you don't need to send a message with your name.
i know but what was the problem?
Reply
#4

Quote:
Originally Posted by Another1
Посмотреть сообщение
i know but what was the problem?
I think you're missing to call correctly the function, Example:

pawn Код:
pName(playerid); //Right
pName //Wrong
Something like this.

@edit

\/ looks down, it can solve your problem.
Reply
#5

pawn Код:
CMD:healme(playerid)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "UnKnown Command! Type /help");
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.0);
    new h_msg[100], ptname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, ptname, MAX_PLAYER_NAME);
    format(h_msg,sizeof (h_msg),"Administrator %s has healed you!", ptname);
    SendClientMessageToAll(RED, h_msg);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)