22.05.2012, 21:12
Try
pawn Код:
if(dialogid == 884)
{
if(response)
{
if(listitem == 0)
{
if(CopOnDuty[playerid] == 0)
{
if(PlayerInfo[playerid][pRank] == 1)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 71);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 700);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 2)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 280);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 700);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 3)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 280);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 700);
GivePlayerWeapon(playerid, 33, 70);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 4)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 281);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 700);
GivePlayerWeapon(playerid, 33, 70);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 5)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 282);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 700);
GivePlayerWeapon(playerid, 33, 70);
GivePlayerWeapon(playerid, 27, 70);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 6)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 282);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 99999);
GivePlayerWeapon(playerid, 33, 99999);
GivePlayerWeapon(playerid, 27, 99999);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 7)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 283);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 99999);
GivePlayerWeapon(playerid, 33, 99999);
GivePlayerWeapon(playerid, 27, 99999);
GivePlayerWeapon(playerid, 29, 99999);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
else if(PlayerInfo[playerid][pRank] == 8)
{
CopOnDuty[playerid] = 1;
SetPlayerSkin(playerid, 288);
SetPlayerToFactionColor(playerid);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 41, 99999);
GivePlayerWeapon(playerid, 33, 99999);
GivePlayerWeapon(playerid, 27, 99999);
GivePlayerWeapon(playerid, 29, 99999);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "[PSP:] %s esta agora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
}
else
{
ResetPlayerWeapons(playerid);
format(string, sizeof(string), "[PSP:] %s esta agora fora de serviзo.",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
}
}
}
return 1;
}