[Pedido] WeaponData
#1

Oi gente, poderiam me passar uma BASE de uma coisinha?.

Bom, eu queria criar um dialog list com as armas q o player tem, Ja tentei criar mas nгo deu certo bugava as armas tals e nгo consegui!
Reply
#2

Quote:
Originally Posted by C4rtm4n
Посмотреть сообщение
Tem uma certa diferenзa de eu querer botar nome das armas que o player tem usando WeaponData, que tutorial de criar dialog.

Lуgico que eu sei criar dialog.
Reply
#3

GetPlayerAmmo: https://sampwiki.blast.hk/wiki/GetPlayerAmmo
GetPlayerWeapon:https://sampwiki.blast.hk/wiki/GetPlayerWeapon

Com o tutorial da dialog e os acima vocк consegue.
Reply
#4

Quote:
Originally Posted by C4rtm4n
Посмотреть сообщение
Use dialog DIALOG_STYLE_TABLIST_HEADERS que ta no link da wiki pedia ai da para vocк fazer isso.
Quote:
Originally Posted by GuilhermeNunes
Посмотреть сообщение
GetPlayerAmmo: https://sampwiki.blast.hk/wiki/GetPlayerAmmo
GetPlayerWeapon:https://sampwiki.blast.hk/wiki/GetPlayerWeapon

Com o tutorial da dialog e os acima vocк consegue.
Vocкs nгo sabe ler? eu pedi para MOSTRAR todas armas que o player tem usando o WeaponData e botar em uma dialoglist, E nгo tutorial de como criar dialog...
Reply
#5

Faзa um loop de 0 atй 12 pegando o ID e muniзгo das armas com GetPlayerWeaponData, depois para pegar o nome da arma use GetWeaponName.

Se nгo souber avisa que faзo um exemplo.
Reply
#6

Quote:
Originally Posted by RodrigoMSR
Посмотреть сообщение
Faзa um loop de 0 atй 12 pegando o ID e muniзгo das armas com GetPlayerWeaponData, depois para pegar o nome da arma use GetWeaponName.

Se nгo souber avisa que faзo um exemplo.
Pode passar exemplo?

Agradeзo!
Reply
#7

PHP код:
new weapammoweapName[40], str[400] = "Arma\tMuniзгo";
for(new 
013i++)
{
    
GetPlayerWeaponData(playeridiweapammo);
    if(
weap && ammo 0)
    {
        
GetWeaponName(weapweapNamesizeof(weapName));
        
format(strsizeof(str), "%s\n%s (%d)\t%d"strweapNameweapammo);
    }
}
ShowPlayerDialog(playerid0DIALOG_STYLE_TABLIST_HEADERS"Armas"str"OK""Cancelar"); 
Reply
#8

Quote:
Originally Posted by RodrigoMSR
Посмотреть сообщение
PHP код:
new weapammoweapName[40], str[400] = "Arma\tMuniзгo";
for(new 
013i++)
{
    
GetPlayerWeaponData(playeridiweapammo);
    if(
weap && ammo 0)
    {
        
GetWeaponName(weapweapNamesizeof(weapName));
        
format(strsizeof(str), "%s\n%s (%d)\t%d"strweapNameweapammo);
    }
}
ShowPlayerDialog(playerid0DIALOG_STYLE_TABLIST_HEADERS"Armas"str"OK""Cancelar"); 
Vaaaaleu Rodrigo, ajudou demais +REP pra vocк!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)