pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if (strcmp("/Kit", cmdtext, true, 4) == 0 || strcmp("/Kits", cmdtext, true, 5) == 0)
{
ShowPlayerDialog(playerid, 512, DIALOG_STYLE_LIST, "Kits de Armas:", "Kit 1 - Escopeta de Combate, UZI, Desert Eagle, Granada - $2500\nKit 2 - Tec 9, Escopeta, M4, Desert Eagle, Coquetel Molotov - $2000\nKit 3 - Escopeta de Cano Serrado, UZI, AK-47, 9MM - $1700\nKit 4 - Escopeta de Combate, Tec 9, Desert Eagle, M4 - $4000\nKit 5 - Escopeta de Cano Serrado, Tec 9, M4, Desert Eagle - $5500\nKit 6 - Motosserra, Detonador, Desert Eagle, Escopeta, M4, Rifle Sniper - $27000", "Comprar", "Sair");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
if(dialogid == 512)
{
if(response>= 1)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >=2000)
{
GivePlayerWeapon(playerid, 28, 200);
GivePlayerWeapon(playerid, 27, 50);
GivePlayerWeapon(playerid, 24, 40);
GivePlayerWeapon(playerid, 16, 10);
GivePlayerMoney(playerid, -2500);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
return 1;
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >=2000)
{
GivePlayerWeapon(playerid, 32, 250);
GivePlayerWeapon(playerid, 25, 25);
GivePlayerWeapon(playerid, 31, 200);
GivePlayerWeapon(playerid, 24, 25);
GivePlayerWeapon(playerid, 18, 5);
GivePlayerMoney(playerid, -2000);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
return 1;
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >=1700)
{
GivePlayerWeapon(playerid,26,250);
GivePlayerWeapon(playerid,28,200);
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,22,100);
GivePlayerMoney(playerid, -1700);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
return 1;
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >=4000)
{
GivePlayerWeapon(playerid,27, 50);
GivePlayerWeapon(playerid,32, 500);
GivePlayerWeapon(playerid,24, 50);
GivePlayerWeapon(playerid,31, 200);
GivePlayerMoney(playerid, -4000);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
return 1;
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >=5500)
{
GivePlayerWeapon(playerid,26, 200);
GivePlayerWeapon(playerid,32, 500);
GivePlayerWeapon(playerid,24, 50);
GivePlayerWeapon(playerid,31, 200);
GivePlayerMoney(playerid, -5500);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
return 1;
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >=27000)
{
GivePlayerWeapon(playerid, 9, 9999);
GivePlayerWeapon(playerid, 39, 47);
GivePlayerWeapon(playerid, 40, 9999);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 25, 370);
GivePlayerWeapon(playerid, 31, 400);
GivePlayerWeapon(playerid, 34, 70);
GivePlayerMoney(playerid, -27000);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Comprou um Kit de Armas!( /Kit )", sendername);
SendClientMessageToAll(green, string);
SendClientMessage(playerid, green, "Kit adiquirido. Mate todos!");
}
else
{
SendClientMessage(playerid, red, "Vocк nгo tem dinheiro suficint para comprar este Kit!");
}
}
}
}
return 1;
}