how to make a /giveplayerweapon command using strtok?
#2

pawn Код:
if(strcmp(cmd,"/setweapon",true)==0)
    {
        new tmp[128],tmp2[128],tmp3[128];
        tmp = strtok(cmdtext,idx); tmp2 = strtok(cmdtext,idx); tmp3 = strtok(cmdtext,idx);
       
        if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid,color,"USAGE: /setweapon [playerid] [weaponid] [ammo]");
        else
        {
            new giveplayerid = strval(tmp),giveplayerweapon = strval(tmp2),giveplayerammo = strval(tmp3);
            GivePlayerWeapon(giveplayerid,giveplayerweapon,giveplayerammo);
        }
        return 1;
    }
Reply


Messages In This Thread
how to make a /giveplayerweapon command using strtok? - by CSMajor - 16.08.2010, 22:37
Re: how to make a /giveplayerweapon command using strtok? - by [XST]O_x - 16.08.2010, 22:44
Re: how to make a /giveplayerweapon command using strtok? - by Injection - 16.08.2010, 22:48

Forum Jump:


Users browsing this thread: 1 Guest(s)