[Pedido]Escudo - Colete
#1

Iae pessoal coruja do SAMP forum. Venho aqui pedir pra quem souber onde posso encontrar um fs que se a pessoa estiver de colete ela apareзa com um colete e um /escudo. Eu ja usei o search mas so achei um /escudo que e diferente pois aparece um escudo mesmo se nao me engano uma porta. Embaixo tem um print, eu tinha tirado a mt tempo e fuзando vi ele. Entao quem souber faser ou poder me diser onde posso encontrar isso so me fala.

ps> Ja pesquisei no ****** e no search;


Prints>


Reply
#2

SetPlayerAttachedObject+SetPlayerArmour
Reply
#3

Ham?? Eu coloco entao
Код:
if(playerarmour == 1) 
SetPlayerAttachedObject(id do colete)
Se puder esplicar melhor agradeзo.
Reply
#4

Eu tenho um FS em PT-BR, dps eu posto aki
Reply
#5

pawn Код:
if(strcmp("/serfoda", cmdtext, true) == 0)
{
     SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
     SetPlayerArmour(playerid, 100);
     SendClientMessage(playerid, 0xE31919FF, "Agora йs foda xP.");    
     return 1;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
     if(GetPlayerArmour(playerid) < 1)
     {
          RemovePlayerAttachedObject(playerid,3);
          return 1;
     }
     return 1;
}
Reply
#6

pawn Код:
#define Escudo 10
public OnPlayerUpdate(playerid)
{
    new Float:ah
    GetPlayerArmour(playerid,ah);
    if(ah > 1)
    {
        SetPlayerAttachedObject(playerid,Escudo,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
    }
    else
    {
        RemovePlayerAttachedObject(playerid,Escudo);
    }
    return true;
}
Reply
#7

Quote:
Originally Posted by CocaC0la
Посмотреть сообщение
pawn Код:
#define Escudo 10
public OnPlayerUpdate(playerid)
{
    new Float:ah
    GetPlayerArmour(playerid,ah);
    if(ah > 1)
    {
        SetPlayerAttachedObject(playerid,Escudo,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
    }
    else
    {
        RemovePlayerAttachedObject(playerid,Escudo);
    }
    return true;
}
Fui mais rбpido -q.

@Topic
~ Bem o meu cуdigo ele terб de digitar um comando para pegar o escudo. E no cуdigo do Coca qndo ele verificar que vocк tem colete ele seta o escudo , entгo й questгo de escolha ^^.

#goldobrasildemoin
Reply
#8

Eu tenho isso no meu servidor, depois eu coloco o cod. aqui.
Reply
#9

se eu nгo me engano achei aqui no forum mais num lembro quem feis.. fais um tempinho q tenho ele no meu GM
pawn Код:
//==============================================================================
    if(!strcmp(cmdtext,"/escudo",true))
{
        SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
        SetPlayerAttachedObject(playerid,4,18642,7,0.1,0.0,-0.11,0.0,-90.0,90.0);
        GivePlayerWeapon(playerid,3,1);
        SendClientMessage(playerid,0xAFAFAFAA," Vocк Pegou Seu Escudo!");
        return 1;
}
//==============================================================================
if(!strcmp(cmdtext,"/Tequips",true))
{
{
for(new i; i<MAX_PLAYERS; i++)
{
        RemovePlayerAttachedObject(i,1);
        RemovePlayerAttachedObject(i,2);
        RemovePlayerAttachedObject(i,3);
        RemovePlayerAttachedObject(i,4);
        }
        SendClientMessage(playerid,0xAFAFAFAA," Vocк Se Desequipou !");
}
return 1;
}
//==============================================================================
if(!strcmp(cmdtext,"/colete",true))
{
        SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
        GivePlayerWeapon(playerid,3,1);
        SendClientMessage(playerid,0xAFAFAFAA," Vocк Pegou Seu Colete !");
        return 1;
}
//==============================================================================
if(!strcmp(cmdtext,"/capacete",true))
    {
        SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
        GivePlayerWeapon(playerid,3,1);
        SendClientMessage(playerid,0xAFAFAFAA," Vocк Pegou Seu Capacete");
        return 1;
}
BOM eu tirei a funзгo SetPlayerArmour por acho desfavoravel ter ela nesse comando pois toda vкs que o player digitar /escudo ou /colete etc.. ele ira renonar o Armour ai ele vai ser o FODГO do seu server '-' entгo retirei mais se quiser colocar fique avontado.
Reply
#10

Li errado mais vou tentar ajudar:

Topo:
pawn Код:
new colete[MAX_PLAYERS];
public OnPlayerCommandText
pawn Код:
if(strcmp("/colete",cmdtext,true,10)==0)
    {
        if(colete[playerid] == 0)
        {
            SetPlayerArmor(playerid, 100);
            SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
            SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
            SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
            SetPlayerAttachedObject(playerid,4,18642,7,0.1,0.0,-0.11,0.0,-90.0,90.0);
            colete[playerid] = 1;
        }
        else if(colete[playerid] == 1)
        {
            SetPlayerArmor(playerid, 0);
            RemovePlayerAttachedObject(playerid,1);
            RemovePlayerAttachedObject(playerid,2);
            RemovePlayerAttachedObject(playerid,3);
            RemovePlayerAttachedObject(playerid,4);
            colete[playerid] = 0;
        }
        return 1;
    }
Se ajudei me dк reputaзгo, obrigado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)