is there a way to shorten this?
#9

Okay have a look at this:

pawn Код:
if(cTeam[playerid] == TEAM_MEDIC) // Useless line...remove it
    if(cTeam[playerid] != TEAM_MEDIC) return SendClientMessage(playerid,COLOR_WHITE,"You are not a medic!");
    else
    { // rest of code
Why return? It'll stop the execution of code in OnPlayerCommandText, therefore it won't say Unknown Command unless SendClientMessage returns 0, which it won't.
Reply


Messages In This Thread
is there a way to shorten this? - by Kitten - 16.10.2010, 23:15
Re: is there a way to shorten this? - by MBX97 - 16.10.2010, 23:18
Re: is there a way to shorten this? - by Las Venturas CNR - 16.10.2010, 23:18
Re: is there a way to shorten this? - by Kitten - 16.10.2010, 23:20
Re: is there a way to shorten this? - by JaTochNietDan - 16.10.2010, 23:21
Re: is there a way to shorten this? - by Las Venturas CNR - 16.10.2010, 23:22
Re: is there a way to shorten this? - by Kitten - 16.10.2010, 23:23
Re: is there a way to shorten this? - by Kitten - 16.10.2010, 23:36
Re: is there a way to shorten this? - by JaTochNietDan - 16.10.2010, 23:38
Re: is there a way to shorten this? - by Ritchie999 - 16.10.2010, 23:39

Forum Jump:


Users browsing this thread: 1 Guest(s)