[Tutorial] Simple Commands+Explain
#2

Perhaps you could also explain under what callback those commands should go. Another thing - I don't see the part where you have declared the variable "cmd" so probably the user who follows this tutorial will get an error telling him the "cmd" symbol is undefined - I suggest you ident your code better.

pawn Код:
if (strcmp("/kickme", cmdtext, true, 10) == 0) {
        {SendClientMessage(playerid, 0x33FF33AA, "you wanted a kick and got it :D");
Kick(playerid);return 1;}
}
Why are you using two blocks since 1 is enough? -

pawn Код:
if ( strcmp ( "/kickme", cmdtext, true, 10 ) == 0 ) {
        SendClientMessage( playerid, 0x33FF33AA, "you wanted a kick and got it :D" );
        Kick(playerid); return 1;
    }
Reply


Messages In This Thread
Simple Commands+Explain - by noder51 - 19.11.2011, 08:40
Re: Simple Commands+Explain - by SmiT - 19.11.2011, 08:58
Re: Simple Commands+Explain - by noder51 - 19.11.2011, 08:59
Re: Simple Commands+Explain - by SmiT - 19.11.2011, 09:07
Re: Simple Commands+Explain - by noder51 - 19.11.2011, 09:32

Forum Jump:


Users browsing this thread: 3 Guest(s)