Comando n Funciona Direito -
WendeLKILL - 28.04.2014
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;
}
Re: Comando n Funciona Direito -
lKoDlFuLLaNNo - 28.04.2014
pawn Код:
if(strcmp(cmd,"/kitvip",true)==0)
{
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
return SendClientMessage(playerid, -1, "Voce Nao esta no interior correto nao podes usar este comando");
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(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; }
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; }
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;
}
Re: Comando n Funciona Direito -
WendeLKILL - 28.04.2014
bom esse cmd Nгo Funcionou entao Tentei Criei Outro Mais Simples mas mesmo Usando
Код:
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
return SendClientMessage(playerid, -1, "Voce Nao esta no interior correto nao podes usar este comando");
Nao Funcionou V
Код:
if(strcmp(cmd, "/kitvip", true) == 0 || strcmp(cmd, "/kititest", true) == 0)
{
if(GetPlayerInterior(playerid) == 4 || GetPlayerInterior(playerid) == 1)
return SendClientMessage(playerid, -1, "Voce Nao esta no interior correto nao podes usar este comando");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pVIP] == 1)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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, 24, 800);
GivePlayerWeapon(playerid, 31, 900);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 25, 600);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 16, 7);
GivePlayerWeapon(playerid, 34, 8);
GivePlayerWeapon(playerid, 35, 1);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerArmour(playerid, 140);
SetPlayerHealth(playerid, 140);
SetPlayerArmour(playerid, 140);
SetPlayerHealth(playerid, 140);
SendClientMessage(playerid,COR_GRO,"Vocк pegou o seu KitVip!");
return 1;
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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(PlayerInfo[playerid][pVIP] == 3)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк Nгo й VIP");
return 1;
}
}
Re: Comando n Funciona Direito -
arakuta - 28.04.2014
Faзa duas condiзхes, uma verificando se ele estб nos interiores desejados, e outra verificando o nнvel de VIP.
pawn Код:
if(GetPlayerInterior(playerid) != 4)
return SendClientMessage(playerid,-1,"Vocк nгo estб no interior 4.");
Re: Comando n Funciona Direito -
lKoDlFuLLaNNo - 28.04.2014
faz como o arakuta falou que ira funcionar, nao pensei na ideia tmb .
Re: Comando n Funciona Direito -
WendeLKILL - 28.04.2014
Entгo no Caso Ficaria Assim ?
pawn Код:
if(strcmp(cmd, "/kitvip", true) == 0 || strcmp(cmd, "/kititest", true) == 0)
{
if(GetPlayerInterior(playerid) != 4 || GetPlayerInterior(playerid) != 1)
{
SendClientMessage(playerid, -1, "Vocк Nгo Estб na Loja De Armas 1 Ou 2.");
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pVIP] == 1)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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, 24, 800);
GivePlayerWeapon(playerid, 31, 900);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 25, 600);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 16, 7);
GivePlayerWeapon(playerid, 34, 8);
GivePlayerWeapon(playerid, 35, 1);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerArmour(playerid, 140);
SetPlayerHealth(playerid, 140);
SetPlayerArmour(playerid, 140);
SetPlayerHealth(playerid, 140);
SendClientMessage(playerid,COR_GRO,"Vocк pegou o seu KitVip!");
return 1;
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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(PlayerInfo[playerid][pVIP] == 3)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Cuidado Nгo equipe em batalha, Ou Poderб levar carandiru.");
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;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк Nгo й VIP");
return 1;
}
}
Re: Comando n Funciona Direito -
arakuta - 28.04.2014
Testa pra ver. A condiзгo й falha. Nгo estб impedindo o resto de code acontecer de forma nenhuma.
Re: Comando n Funciona Direito -
lKoDlFuLLaNNo - 28.04.2014
pawn Код:
if(GetPlayerInterior(playerid) != 4)
return SendClientMessage(playerid,-1,"Vocк nгo estб no interior 4.");
if(GetPlayerInterior(playerid) != 1)
return SendClientMessage(playerid,-1,"Vocк nгo estб no interior 1.");