16.01.2015, 09:06
why it showing me the warn...
this how i define
pawn Код:
(11126) : warning 225: unreachable code
pawn Код:
CMD:unloadarmory(playerid, params[])
{
new vehicleid;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid) && !IsAARMY(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You aren't a law to use this command.");
if(!IsPlayerInRangeOfPoint(playerid, 2.7,256.2174,77.3295,1004.0344)) return SendClientMessage(playerid, COLOR_GREY, "You aren't near armory equipment unloading place.");
if(GetVehicleModel(vehicleid) == 515 || GetVehicleModel(vehicleid) == 509) return SendClientMessage(playerid, COLOR_GREY, "You are not in a roadtrain.");
if(PlayerInfo[playerid][pArmoryRefilled] == 1)
{
PlayerInfo[playerid][pArmoryRefilled] = 0;
return SendClientMessage(playerid, COLOR_GREY, "You refilled the armory equipment.");
Armory[MP5] = 15; // this line that giving me the warn
Armory[M4] = 15;
Armory[COMBAT] = 15;
}
return 1;
}
pawn Код:
#define DEF_MP5COUNT 15
#define DEF_COMBATCOUNT 15
#define DEF_M4COUNT 15
enum armassets
{
MP5,
COMBAT,
M4
}
new Armory[armassets];