05.03.2016, 17:17
(
Последний раз редактировалось rhaegartargaryen; 05.03.2016 в 17:50.
)
Testa e ve se funciona
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Gunrack)
{
new gunid = GetPlayerWeapon(playerid);
new ammo = GetPlayerAmmo(playerid);
new i = GetPlayerVehicleID(playerid);
new armaid;
new valormunicao;
if (response)
{
if(listitem == 0 && gunid != 0)
{
if(GunRackInfo[i][gWeapon1] != 0)
{
SendClientMessage(playerid, COLOR_ERROR, "Jб existe uma arma no slot selecionado.");
return 1;
}
if(gunid == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "Escolha sua arma que deseja colocar no gunrack.");
return 1;
}
GunRackInfo[i][gWeapon1] = gunid;
GunRackInfo[i][gAmmo1] = ammo;
RemovePlayerWeapon(playerid, gunid);
SendClientMessage(playerid,COLOR_WHITE, "Vocк colocou sua arma no gunrack.");
}
if(listitem == 1)
{
armaid = GunRackInfo[i][gWeapon1];
valormunicao = GunRackInfo[i][gAmmo1];
SendClientMessage(playerid,COLOR_WHITE, "Vocк pegou sua arma mo gunrack.");
GivePlayerWeapon(playerid, armaid, valormunicao);
return 1;
}
}
}
return 0;
}