03.11.2009, 20:07
Код:
Ok i just edited my /uniform command and then i get 26 errors please help me
if(strcmp(cmd, "/uniform", true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pMember] != 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"_______Uniform_____");
SendClientMessage(playerid, COLOR_GREY," 1.Cadet 2.Officer ");
SendClientMessage(playerid, COLOR_GREY," 3.Sergeant 4.Lieutenant ");
SendClientMessage(playerid, COLOR_GREY," 5.Captain 6.Chief ");
SendClientMessage(playerid, COLOR_GREY," 7.FBI 8.Army ");
SendClientMessage(playerid, COLOR_GREY," 9.Swat 9.Bike ");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"type the name like /[name] ");
return 1;
}
}
else if(strcmp(cmd,"/Cadet",true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerInfo[playerid][pRank] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank1 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] >= 1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the Cadet uniform from this lock",name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid, 71);
return 1;
}
}
}
}
else if(strcmp(cmd,"/Officer",true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerInfo[playerid][pRank] < 2)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank2 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] >= 2)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the Officer uniform from this lock", name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid,281);
return 1;
}
}
}
}
else if(strcmp(cmd,"/Sergeant",true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerInfo[playerid][pRank] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank3 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] >= 3)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the Sergeant uniform from this lock", name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid,282);
return 1;
}
}
}
}
else if(strcmp(cmd,"/Lieutenant",true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank4 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] >= 4)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the Lieutenant uniform from this lock", name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid,282);
return 1;
}
}
}
}
else if(strcmp(cmd,"/Captain",true) == 0)
{
if(PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank5 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] >= 5)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the Captain uniform from this lock", name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid,283);
return 1;
}
}
}
}
else if(strcmp(cmd,"/Chief",true) == 0)
{
if (PlayerToPoint(3, playerid,254.9053,76.4039,1003.6406) || PlayerToPoint(3,playerid,254.9053,76.4039,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
if (PlayerInfo[playerid][pRank] < 6)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least rank6 !");
return 1;
}
else if (PlayerInfo[playerid][pRank] == 6)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s Just got the chief uniform from this lock", name);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
SetPlayerSkin(playerid,288);
return 1;
}
}
}
}

