/info command
#3

Quote:
Originally Posted by SaYrOn
Посмотреть сообщение
Well, maybe it's just a typo here, but when you are checking if player is admin you forgot to add bracket and playerid on SendClientMessage :/
Oh wow... I completely missed "(playerid," But now I put it in so lets see if it works :\


Edit: The command still doesn't seem to work In game. I do get two warnings.
This the the pawn code I have now:
pawn Код:
CMD:info(playerid, params[])
{
    new targetid, string[128];
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /info[id]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only Administrators have access to this command.");
    if( targetid != INVALID_PLAYER_ID )
    {
        format(string, sizeof(string),"Health: %d  Armor: %d  Score: %d  Cash: %d",GetPlayerHealth(targetid),GetPlayerArmour(targetid), GetPlayerScore(targetid),GetPlayerMoney(targetid));//line 349
        SendClientMessage(playerid,COLOR_RED,string);
    }
    return 1;
}

And these are the warnings I get:
Код:
C:\Users\user\Desktop\h\gamemodes\new.pwn(349) : warning 202: number of arguments does not match definition
C:\Users\user\Desktop\h\gamemodes\new.pwn(349) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply


Messages In This Thread
/info command - by nogh445 - 15.08.2012, 18:03
Re: /info command - by SaYrOn - 15.08.2012, 18:19
Re: /info command - by nogh445 - 15.08.2012, 18:22
Re: /info command - by SaYrOn - 15.08.2012, 18:45
Re: /info command - by Jessyy - 15.08.2012, 20:34
Re: /info command - by SaYrOn - 15.08.2012, 21:00
Re: /info command - by nogh445 - 15.08.2012, 21:48
Re: /info command - by SaYrOn - 15.08.2012, 21:50

Forum Jump:


Users browsing this thread: 1 Guest(s)