28.04.2014, 20:23
Bom Eu Estou Tentando Fazer com que esse Cmd de /kitvip De para Dar somente nos interiores 1 e 4 mais Quando Tentei fazer acabou que o Kitvip da pra ser usado em qualquer lugar e Somente o Bronze Ta Indo os Outros nao vao Alguйm Pode me ajudar ?
pawn Код:
if(strcmp(cmd,"/kitvip",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Esse comando so pode ser usado por jogadores Vips");
return 1;
}
new x_nr[45];
x_nr = strtok(cmdtext, idx);
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Vocк Nгo pode usar este comando preso!");
return 1;
}
if(strcmp(x_nr,"bronze",true) == 0)//Vip Prata
{
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
if(PlayerInfo[playerid][pVIP] != 1) { SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo e Vip Bronze"); return 1; }
ResetPlayerWeaponsEx(playerid);
format(string, sizeof(string), "Vip %s Pegou Seu Kit Vip Bronze.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 46, 1);
GivePlayerWeapon(playerid, 24, 180);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 31, 170);
GivePlayerWeapon(playerid, 16, 2);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 34, 5);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou o seu Kit Vip Bronze!");
return 1;
}
else if(strcmp(x_nr,"prata",true) == 0)//Vip Ouro
{
if(PlayerInfo[playerid][pVIP] != 2) { SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo e Vip Prata!"); return 1; }
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
ResetPlayerWeaponsEx(playerid);
format(string, sizeof(string), "Vip %s Pegou Seu Kit Vip Prata.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 46, 1);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 31, 200);
GivePlayerWeapon(playerid, 16, 3);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 34, 6);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou o seu Kit VIP Prata!");
return 1;
}
else if(strcmp(x_nr,"ouro",true) == 0)//Vip Ouro
{
if(PlayerInfo[playerid][pVIP] != 3) { SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo e Vip-Ouro!"); return 1; }
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
ResetPlayerWeaponsEx(playerid);
format(string, sizeof(string), "Vip %s Pegou Seu Kit Vip Ouro.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 46, 1);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 31, 200);
GivePlayerWeapon(playerid, 16, 4);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 34, 7);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"Vocк pegou o seu Kit VIP Ouro!");
return 1;
}
}
return 1;
}