Author Topic: help..  (Read 2495 times)

0 Members and 1 Guest are viewing this topic.

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
help..
« on: April 23, 2011, 07:00:54 pm »
Code: [Select]
else if (strcmp(cmd, "!wep", true) == 0) {
new wep;
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if (!strlen(tmp)) SendClientMessage(playerid, COLOR_GREEN, "USAGE: !wep [WeaponName/ID]");
else {
wep = FindWepIDFromString(tmp);
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);
else SendClientMessage(playerid,COLOR_RED,"You can't get this weapon, sorry.");
}
return 1;
}

I get this error when compile:
Code: [Select]
warning 206: redundant test: constant expression is non-zero
I need to make this work for two weapons
« Last Edit: April 23, 2011, 07:03:25 pm by Synx »

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: help..
« Reply #1 on: April 23, 2011, 10:18:12 pm »
Problem is at
Quote
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);

Edit as

Quote
if(wep != 33 || 30) SetPlayerWeapon(playerid,wep,9999999);
Outdoor city server Administrator, FS server owner!

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Re: help..
« Reply #2 on: April 24, 2011, 11:27:05 am »
Problem is at
Quote
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);

Edit as

Quote
if(wep != 33 || 30) SetPlayerWeapon(playerid,wep,9999999);

Thanks. :)