23.11.2009, 17:47
Quote:
Originally Posted by zєяσмαиѕтєя
Quote:
|
You didnt define what playerid is.
What i mean is... if you use sscanf you'd write it like this.
pawn Код:
irccmd_plinfo(conn, channel[], user[], params[])
{
#pragma unused conn , params , user
if(!IsPlayerOp(conn,channel,user)) return AccessDenied(user);
new string[284];
new playerid;
if(sscanf(params, "i", playerid))
return IRC_GroupSay(GroupID[0], channel, "USAGE: !plinfo [playerid]");
So after the code above, you would also need to do checks like if(!IsPlayerConnected(playerid)) then do a return message for that.
As dice7 said, playerid will be 0. The reason for that is when an array is created its automatically given the value 0.
So you must define what exactly it will be used as, in order for it to work correctly.