Vice City Multiplayer
		VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Synx on April 23, 2011, 07:00:54 pm
		
			
			- 
				
	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
			 
			
			- 
				Problem is at
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);
Edit as
if(wep != 33 || 30) SetPlayerWeapon(playerid,wep,9999999);
			 
			
			- 
				
Problem is at
if(wep != 33, 30) SetPlayerWeapon(playerid,wep,9999999);
Edit as
if(wep != 33 || 30) SetPlayerWeapon(playerid,wep,9999999);
Thanks. :)