SA-MP Forums Archive
[Pedido] Sirene,Arma nas Costa e include - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sirene,Arma nas Costa e include (/showthread.php?tid=320754)



[Pedido] Sirene,Arma nas Costa e include - henrique_wwi - 24.02.2012

Queria Algum Code ou fs de sirene e arma nas costa e tambem queria include ou plugin do radio!!
Ja procurei mais nao achei !!!Vlw


Re: [Pedido] Sirene,Arma nas Costa e include - kinhobryant - 24.02.2012

Arma colada , by eu.

PHP код:
#include <a_samp>
#define SlotAKeFUZIL 1
#define SlotEscopeta 2
//----------------------------------------------------------------------------------------------------------------------------------------------------------------
public OnPlayerUpdate(playerid)
{
    if(!
IsPlayerInAnyVehicle(playerid))
    {
        new 
Armas[MAX_PLAYERS],Balas[MAX_PLAYERS];
        
GetPlayerWeaponData(playerid5Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 30 && Balas[playerid] >= 1)//Ak-47
        
{
            if(
GetPlayerWeapon(playerid) == 30RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playeridSlotAKeFUZIL3551, -0.060921, -0.1416730.0000000.00000035.3627350.000000);
        }
        else if(
Armas[playerid] == 31 && Balas[playerid] >= 1//FUZIL
        
{
            if(
GetPlayerWeapon(playerid) == 31RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playeridSlotAKeFUZIL3561, -0.099681, -0.1334080.0000001.02759219.6677850.000000);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
        }
        
GetPlayerWeaponData(playerid3Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 25 && Balas[playerid] >= 1)//escopeta
        
{
            if(
GetPlayerWeapon(playerid) == 25RemovePlayerAttachedObject(playerid,SlotEscopeta);
             else 
SetPlayerAttachedObject(playeridSlotEscopeta3491, -0.109260, -0.059651, -0.066210186.31072942.3753626.716565);
        }
        else if(
Armas[playerid] == 27 && Balas[playerid] >= 1//escopeta de combate
        
{
              if(
GetPlayerWeapon(playerid) == 27RemovePlayerAttachedObject(playerid,SlotEscopeta);
            else 
SetPlayerAttachedObject(playeridSlotEscopeta3511, -0.181073, -0.056285, -0.081242181.26972939.39908512.246994);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotEscopeta);
        }
    }
    return 
1;

Se qser colocar mais vai ter q adicionar mais e mudar o valor


Sirene eu nгo tenho D: sorry


Re: [Pedido] Sirene,Arma nas Costa e include - Caio_Freeze - 24.02.2012

Quote:
Originally Posted by kinhobryant
Посмотреть сообщение
Arma colada , by eu.

PHP код:
#include <a_samp>
#define SlotAKeFUZIL 1
#define SlotEscopeta 2
//----------------------------------------------------------------------------------------------------------------------------------------------------------------
public OnPlayerUpdate(playerid)
{
    if(!
IsPlayerInAnyVehicle(playerid))
    {
        new 
Armas[MAX_PLAYERS],Balas[MAX_PLAYERS];
        
GetPlayerWeaponData(playerid5Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 30 && Balas[playerid] >= 1)//Ak-47
        
{
            if(
GetPlayerWeapon(playerid) == 30RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playeridSlotAKeFUZIL3551, -0.060921, -0.1416730.0000000.00000035.3627350.000000);
        }
        else if(
Armas[playerid] == 31 && Balas[playerid] >= 1//FUZIL
        
{
            if(
GetPlayerWeapon(playerid) == 31RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playeridSlotAKeFUZIL3561, -0.099681, -0.1334080.0000001.02759219.6677850.000000);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
        }
        
GetPlayerWeaponData(playerid3Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 25 && Balas[playerid] >= 1)//escopeta
        
{
            if(
GetPlayerWeapon(playerid) == 25RemovePlayerAttachedObject(playerid,SlotEscopeta);
             else 
SetPlayerAttachedObject(playeridSlotEscopeta3491, -0.109260, -0.059651, -0.066210186.31072942.3753626.716565);
        }
        else if(
Armas[playerid] == 27 && Balas[playerid] >= 1//escopeta de combate
        
{
              if(
GetPlayerWeapon(playerid) == 27RemovePlayerAttachedObject(playerid,SlotEscopeta);
            else 
SetPlayerAttachedObject(playeridSlotEscopeta3511, -0.181073, -0.056285, -0.081242181.26972939.39908512.246994);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotEscopeta);
        }
    }
    return 
1;

Se qser colocar mais vai ter q adicionar mais e mudar o valor


Sirene eu nгo tenho D: sorry
Vc poderia colocar um codigo pra criar mais ?


Re: [Pedido] Sirene,Arma nas Costa e include - kinhobryant - 24.02.2012

adiciona mais defines
ex.:

PHP код:
#define SlotEagle 3 
Depois cria

PHP код:
else if(Armas[playerid] == 24 && Balas[playerid] >= 1//EAGLE
        

            if(
GetPlayerWeapon(playerid) == 31RemovePlayerAttachedObject(playerid,SlotEagle); 
            else 
SetPlayerAttachedObject(playeridSlotAKeFUZIL3561, -0.099681, -0.1334080.0000001.02759219.6677850.000000); 
        } 



Re: [Pedido] Sirene,Arma nas Costa e include - Hiuship - 24.02.2012

Posso contrariar seu sistema manin

Ele mostra somente a arma atual nao a que o cara tem... e nao й sу ir add define pro slot.. define sу um e de acordo que troca a arma limpa e coloca a otra...