15.08.2012, 18:22
Quote:
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 :/
|
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.