• Welcome to Vice City Multiplayer.
 

help..

Started by Synx, April 23, 2011, 06:00:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Synx

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:
warning 206: redundant test: constant expression is non-zero

I need to make this work for two weapons

BIG[H]

Problem is at
Quote
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);

Edit as

Quoteif(wep != 33 || 30) SetPlayerWeapon(playerid,wep,9999999);
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

Synx

Quote from: BIG[H] on April 23, 2011, 09:18:12 PM
Problem is at
Quote
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);

Edit as

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

Thanks. :)