24.12.2012, 11:38
pawn Код:
if(skin != 71 || skin != 280 || skin != 281 || skin != 282 || skin != 284 || skin != 285)
if(skin != 71 || skin != 280 || skin != 281 || skin != 282 || skin != 284 || skin != 285)
I think for what you want, you'll have to replace the || with the &&.
quicker way would be an array, I guess.. |
case 0: // PCSO // nothing
{
if(FacInfo[playerid][fRank1] == 1)
SetPlayerSkin(playerid, 71);
format(string, sizeof(string), "* %s puts on their community support clothing.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
case 1: // Warrented Officer // Baton + Spray
{
if(FacInfo[playerid][fRank1] >= 1) return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank!");
GiveZaiatWeapon(playerid, 3, 1);
GiveZaiatWeapon(playerid, 41, 1000);
SetPlayerSkin(playerid, 280);
format(string, sizeof(string), "* %s grabs a Baton and CS Spray from their locker.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
case 0: // PCSO // nothing
{
if(FacInfo[playerid][fRank1] == 1)
{
SetPlayerSkin(playerid, 71);
format(string, sizeof(string), "* %s puts on their community support clothing.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
}
case 1: // Warrented Officer // Baton + Spray
{
if(FacInfo[playerid][fRank1] <= 1) return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank!");
{
GiveZaiatWeapon(playerid, 3, 1);
GiveZaiatWeapon(playerid, 41, 1000);
SetPlayerSkin(playerid, 280);
format(string, sizeof(string), "* %s grabs a Baton and CS Spray from their locker.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
}
Thank you
Also maybe you will know whats wrong here? pawn Код:
|
case 0: // PCSO // nothing
{
if(FacInfo[playerid][fRank1] != 1) return 0; //You didn't return before.
SetPlayerSkin(playerid, 71);
format(string, sizeof(string), "* %s puts on their community support clothing.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
case 1: // Warrented Officer // Baton + Spray
{
if(FacInfo[playerid][fRank1] >= 1) return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank!");
GiveZaiatWeapon(playerid, 3, 1);
GiveZaiatWeapon(playerid, 41, 1000);
SetPlayerSkin(playerid, 280);
format(string, sizeof(string), "* %s grabs a Baton and CS Spray from their locker.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
switch(skin)
{
case 251,252,181,255: return 0; //Etc.