[Pedido] Sistema de Gunrack (Guardar armas em viatura)
#1

Alguйm pode fazer esse sistema pra min? chama no privado. (De graзa ou nгo)
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=575042&page=2

https://sampforum.blast.hk/showthread.php?tid=602307
Reply
#3

Olha teu PM ruan.
Reply
#4

Esse cуdigo nгo estб funcionando..
Tipo dou /gunrack ele nгo aparece nada..

PHP код:
CMD:gunrank(playeridparams[])
{
    new
        
id GetPlayerVehicleID(playerid);
    if (
IsPlayerInAnyVehicle(playerid))
    {
        if (
IsVehicleImpounded(id))
            return 
SendErrorMessage(playerid"Este veнculo й apreendido e vocк nгo pode usб-lo.");
        if (!
PoliceCar(id))
            return 
SendErrorMessage(playerid"Este veнculo nгo possuн suporte.");
        
Car_ArmasGunrack(playeridid);
    }
    else 
SendErrorMessage(playerid"Vocк nгo estб dentro de nenhum veнculo.");
    return 
1;
}
///==============================
Car_ArmasGunrack(playeridcarid)
{
    if (!
CarData[carid][carExists] || CarData[carid][carLocked])
        return 
0;
    static
        
string[164];
    
string[0] = 0;
    if (
22 <= CarData[carid][carArmaGunrack] <= 38)
        
format(stringsizeof(string), "%s%s - Muniзгo: %d\n"stringReturnWeaponName(CarData[carid][carArmaGunrack]), CarData[carid][carMuniGunrack]);
    else
        
format(stringsizeof(string), "%s%s\n"string, (CarData[carid][carArmaGunrack]) ? (ReturnWeaponName(CarData[carid][carMuniGunrack])) : ("Slot Livre"));
    
Dialog_Show(playeridGunrackDIALOG_STYLE_LIST"Suporte"string"Selecionar""Cancelar");
    return 
1;
}
DIALOG V
///==============================
Dialog:Gunrack(playeridresponselistiteminputtext[])
{
        if (
response)
        {
            new 
carid GetPlayerVehicleID(playerid);
            if (!
CarData[carid][carArmaGunrack])
            {
                if (!
GetWeapon(playerid))
                    return 
SendErrorMessage(playerid"Vocк nгo estб segurando uma arma.");
                   if (
GetWeapon(playerid) == 23 && PlayerData[playerid][pTazer])
                    return 
SendErrorMessage(playerid"Vocк nгo pode guardar um taser.");
                if (
GetWeapon(playerid) == 25 && PlayerData[playerid][pBeanBag])
                    return 
SendErrorMessage(playerid"Vocк nгo pode guardar uma beanbag.");
                if (
ArmasGunrack(playerid))
                    return 
SendErrorMessage(playerid"Vocк nгo pode guardar essa arma. (Apenas M4/Shotgun/MP5)");
                   
CarData[carid][carArmaGunrack] = GetWeapon(playerid);
                
CarData[carid][carMuniGunrack] = GetPlayerAmmo(playerid);
                if(
CarData[carid][carMuniGunrack] != GetPlayerAmmo(playerid))
                {
                    
CarData[carid][carMuniGunrack] = GetPlayerAmmo(playerid);
                }
                
ResetWeapon(playeridCarData[carid][carArmaGunrack]);
                
SendNearbyMessage(playerid10.0COLOR_PURPLE"%s leva sua mгo atй o suporte e guarda uma %s no mesmo."ReturnName(playerid0), ReturnWeaponName(CarData[carid][carArmaGunrack]));
                
Car_Save(carid);
                
Car_ArmasGunrack(playeridcarid);
            }
            else
            {
                
GiveWeaponToPlayer(playeridCarData[carid][carArmaGunrack], CarData[carid][carMuniGunrack]);
                
SendNearbyMessage(playerid10.0COLOR_PURPLE"%s leva sua mгo atй o suporte e retira uma %s do mesmo."ReturnName(playerid0), ReturnWeaponName(CarData[carid][carArmaGunrack]));
                
CarData[carid][carArmaGunrack] = 0;
                
CarData[carid][carMuniGunrack] = 0;
                
Car_Save(carid);
                
Car_ArmasGunrack(playeridcarid);
            }
        }
        return 
1;
}
stock ArmasGunrack(playerid)
{
    switch (
GetPlayerWeapon(playerid)) {
        case 
1..24283032..46: return 1;
    }
    return 
0;

Reply
#5

UP alguйm ajuda..
Reply
#6

Quote:
Originally Posted by C4rtm4n
Посмотреть сообщение
Olha teu PM ruan.
Tem nada aqui, se for o sistema de pesca jб resolvi..
Reply
#7

@EDIT. Resolvido sу nгo estб reconhecendo a arma no dialog.
Reply
#8

UP~~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)