GiveAllWeapons with strcmp?
#1

Heey all,

I am helping a friend with a giveallweapons command and he wants to have his command with strcmp.
I never used strcmp because i am using dcmd so i used the dance code for the params.
Код:
new cmd[256];
new idx;
new weaponid;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/giveallweapons", true) == 0)
    {
		cmd = strtok(cmdtext, idx);
 		tmp = strtok(cmdtext, idx);
		weaponid = strval(tmp);
		if(weaponid < 1 || weaponid > 46) {
  			SendClientMessage(playerid,0xFF0000FF,"USAGE: /giveallweapons [weaponid]");
	    	return 1;
		}
But why it gives the message everytime when i fill in the right code :/giveallweapons 2 it says the error message^
I didnt show the whole code because its only about that message showing when you fill right id.
Reply


Messages In This Thread
GiveAllWeapons with strcmp? - by Admigo - 13.05.2012, 10:34
Re: GiveAllWeapons with strcmp? - by JaKe Elite - 13.05.2012, 10:38
Re: GiveAllWeapons with strcmp? - by Admigo - 13.05.2012, 10:40
Re: GiveAllWeapons with strcmp? - by Dan_Barocu - 13.05.2012, 11:39
Re: GiveAllWeapons with strcmp? - by Vince - 13.05.2012, 11:46

Forum Jump:


Users browsing this thread: 4 Guest(s)