16.06.2012, 07:05
You forgot to put "!" before the IsPlayerInRangeOfPoint.
P.S organise your code a little bit better next time
P.S organise your code a little bit better next time
pawn Код:
CMD:oskin(playerid, params[])
{
if(PlayerOrg[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in any organization, so stop using this command");
{
if (!IsPlayerInRangeOfPoint(playerid, 3.0,2459.3740,-1690.8842,13.5464)) return SendClientMessage(playerid,COLOR_RED,"You are not at the GSF Headquater");
{
if (PlayerOrg[playerid] == 1)
{
SetPlayerColor(playerid, Green1);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 107);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid,106);
GivePlayerWeapon(playerid, 5,1);
GivePlayerWeapon(playerid, 22,200);
GivePlayerWeapon(playerid, 28, 200);
}
if (!IsPlayerInRangeOfPoint(playerid, 3.0,1905.9891,-1113.5447,26.6641)) return SendClientMessage(playerid,COLOR_RED,"You are not at the Ballas Headquater");
{
if (PlayerOrg[playerid] == 2)
{
SetPlayerColor(playerid, COLOR_PURPLE);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 102);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid,103);
GivePlayerWeapon(playerid, 5,1);
GivePlayerWeapon(playerid, 22,200);
GivePlayerWeapon(playerid, 32, 200);
}
if (!IsPlayerInRangeOfPoint(playerid, 3.0,1882.8102,-2016.0778,13.5469)) return SendClientMessage(playerid,COLOR_RED,"You are not at the Los Aztecas Headquater");
{
if (PlayerOrg[playerid] == 3)
{
SetPlayerColor(playerid, blue1);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 116);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid, 115);
GivePlayerWeapon(playerid, 4,1);
GivePlayerWeapon(playerid, 22,200);
GivePlayerWeapon(playerid, 28, 200);
}
if (!IsPlayerInRangeOfPoint(playerid, 3.0,1553.2577,-1675.4991,16.1953)) return SendClientMessage(playerid,COLOR_RED,"You are not at the SAPD Headquater");
{
if (PlayerOrg[playerid] == 4)
{
SetPlayerColor(playerid, COLOR_BLUE);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 280);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid, 281);
GivePlayerWeapon(playerid, 3,1);
GivePlayerWeapon(playerid, 22,200);
GivePlayerWeapon(playerid, 16, 50);
}
if (!IsPlayerInRangeOfPoint(playerid, 3.0,213.4593,1869.0469,13.1406)) return SendClientMessage(playerid,COLOR_RED,"You are not at the SAAF Headquater");
{
if (PlayerOrg[playerid] == 5)
{
SetPlayerColor(playerid, Green2);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 287);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid,286);
GivePlayerWeapon(playerid, 4,1);
GivePlayerWeapon(playerid, 24,200);
GivePlayerWeapon(playerid, 31, 200);
}
if (!IsPlayerInRangeOfPoint(playerid, 3.0, -2650.2827,634.9139,14.4531)) return SendClientMessage(playerid,COLOR_RED,"You are not at the SAH Headquater");
{
if (PlayerOrg[playerid] == 6)
{
SetPlayerColor(playerid, red);
if(IsLeader(playerid))
{
SetPlayerSkin(playerid, 274);
if(!IsLeader(playerid))
{
SetPlayerSkin(playerid, 275);
GivePlayerWeapon(playerid, 4,1);
GivePlayerWeapon(playerid, 22,200);
GivePlayerWeapon(playerid, 17, 5);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
return 1;
}