Confused about command return
#3

Can you please, pleave, give more explications.
I mean, your command isn't working because nothing is check before if(id == playerid) ? If OnPlayerCommandPerformed is called, it's something is returning 0.

Try this one:
PHP код:
CMD:gethere(playerid,params[])
{
    new 
id;
        
// codes...
    
if(sscanf(params"u",id)) return SendClientMessage(playerid,COLOR,"Use: {FFFFFF}/gethere [ID / Name]");
    
/* u : player id or player's part of name
    - You don't need else here*/
     
if(PlayerInfo[id][LoggedOn] == false) return SCM(playeridCOLOR,"That dude is offline!");
    if(
id == INVALID_PLAYER_ID || id == playerid)return SCM(playerid,COLOR,"Wrong ID!");
    
// codes... 
EDIT: Mistakes (thx Sew_Sumi)
Reply


Messages In This Thread
Confused about command return - by Sime30 - 13.06.2016, 22:07
Re: Confused about command return - by lolumadd_ - 14.06.2016, 02:51
Re: Confused about command return - by Dayrion - 14.06.2016, 08:28
Re: Confused about command return - by Sew_Sumi - 14.06.2016, 09:02
Re: Confused about command return - by Sjn - 14.06.2016, 09:16
Re: Confused about command return - by Dayrion - 14.06.2016, 09:16
Re: Confused about command return - by Sime30 - 14.06.2016, 16:38
Re: Confused about command return - by Sjn - 14.06.2016, 16:40
Re: Confused about command return - by Sime30 - 14.06.2016, 16:47
Re: Confused about command return - by zPain - 14.06.2016, 16:51
Re: Confused about command return - by Sjn - 14.06.2016, 16:59
Re: Confused about command return - by Sime30 - 14.06.2016, 17:01

Forum Jump:


Users browsing this thread: 3 Guest(s)