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(playerid, 5, Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 30 && Balas[playerid] >= 1)//Ak-47
        
{
            if(
GetPlayerWeapon(playerid) == 30) RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playerid, SlotAKeFUZIL, 355, 1, -0.060921, -0.141673, 0.000000, 0.000000, 35.362735, 0.000000);
        }
        else if(
Armas[playerid] == 31 && Balas[playerid] >= 1) //FUZIL
        
{
            if(
GetPlayerWeapon(playerid) == 31) RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playerid, SlotAKeFUZIL, 356, 1, -0.099681, -0.133408, 0.000000, 1.027592, 19.667785, 0.000000);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
        }
        
GetPlayerWeaponData(playerid, 3, Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 25 && Balas[playerid] >= 1)//escopeta
        
{
            if(
GetPlayerWeapon(playerid) == 25) RemovePlayerAttachedObject(playerid,SlotEscopeta);
             else 
SetPlayerAttachedObject(playerid, SlotEscopeta, 349, 1, -0.109260, -0.059651, -0.066210, 186.310729, 42.375362, 6.716565);
        }
        else if(
Armas[playerid] == 27 && Balas[playerid] >= 1) //escopeta de combate
        
{
              if(
GetPlayerWeapon(playerid) == 27) RemovePlayerAttachedObject(playerid,SlotEscopeta);
            else 
SetPlayerAttachedObject(playerid, SlotEscopeta, 351, 1, -0.181073, -0.056285, -0.081242, 181.269729, 39.399085, 12.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(playerid, 5, Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 30 && Balas[playerid] >= 1)//Ak-47
        
{
            if(
GetPlayerWeapon(playerid) == 30) RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playerid, SlotAKeFUZIL, 355, 1, -0.060921, -0.141673, 0.000000, 0.000000, 35.362735, 0.000000);
        }
        else if(
Armas[playerid] == 31 && Balas[playerid] >= 1) //FUZIL
        
{
            if(
GetPlayerWeapon(playerid) == 31) RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
            else 
SetPlayerAttachedObject(playerid, SlotAKeFUZIL, 356, 1, -0.099681, -0.133408, 0.000000, 1.027592, 19.667785, 0.000000);
        }
        else
        {
            
RemovePlayerAttachedObject(playerid,SlotAKeFUZIL);
        }
        
GetPlayerWeaponData(playerid, 3, Armas[playerid], Balas[playerid]);
        if(
Armas[playerid] == 25 && Balas[playerid] >= 1)//escopeta
        
{
            if(
GetPlayerWeapon(playerid) == 25) RemovePlayerAttachedObject(playerid,SlotEscopeta);
             else 
SetPlayerAttachedObject(playerid, SlotEscopeta, 349, 1, -0.109260, -0.059651, -0.066210, 186.310729, 42.375362, 6.716565);
        }
        else if(
Armas[playerid] == 27 && Balas[playerid] >= 1) //escopeta de combate
        
{
              if(
GetPlayerWeapon(playerid) == 27) RemovePlayerAttachedObject(playerid,SlotEscopeta);
            else 
SetPlayerAttachedObject(playerid, SlotEscopeta, 351, 1, -0.181073, -0.056285, -0.081242, 181.269729, 39.399085, 12.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) == 31) RemovePlayerAttachedObject(playerid,SlotEagle); 
            else 
SetPlayerAttachedObject(playerid, SlotAKeFUZIL, 356, 1, -0.099681, -0.133408, 0.000000, 1.027592, 19.667785, 0.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...