cmd no work
#4

it looks like someone is posting without knowing what he's doing...
now, what error does the message return? also does it happen with every command? do you have any filterscripts that use strcmp to handle commands? I'm asking because that command is perfect.

Quote:
Originally Posted by Littlehelper[MDZ]
Посмотреть сообщение
Advanced one >>
pawn Код:
CMD:gun(playerid,params[])
{
new WeaponName[50];
if(sscanf(params,"s[50]"WeaponName))  return SendClientMessage(playerid, -1, "[USAGE] /Gun [Gun-Name]");
GivePlayerWeapon(playerid, GetWeaponModelIDFromName(WeaponName), 10000);
return 1;
}
And add this.
pawn Код:
stock GetWeaponModelIDFromName(wname[])
{
    for(new i = 0; i < 48; i++) {
        if (i == 19 || i == 20 || i == 21) continue;
        if (strfind(aWeaponNames[i], wname, true) != -1) {
            return i;
        }
    }
    return -1;
}
tell me how this does answer his question..
also "undefined symbol "aWeaponNames"".
Reply


Messages In This Thread
cmd no work - by thefatshizms - 07.06.2012, 21:32
Re: cmd no work - by zDevon - 07.06.2012, 22:25
Re: cmd no work - by Littlehelper - 07.06.2012, 22:28
Re: cmd no work - by admantis - 07.06.2012, 22:29
Re: cmd no work - by Littlehelper - 07.06.2012, 22:37

Forum Jump:


Users browsing this thread: 1 Guest(s)