[Pedido] /capacete
#1

Bom, й sу isso... /capacete. Alguйm pode ajudar?
Reply
#2

pawn Код:
CMD:capacete(playerid)
{

    SetPlayerAttachedObject( playerid, 5, 18645, 2, 0.07, 0, 0, 88, 75, 0 );
    return 1;
}
Reply
#3

http://pastebin.com/CbQaAq9b

by [NoiX]Eduardo

Crйditos: Hiddos
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=256555

ou

https://sampforum.blast.hk/showthread.php?tid=195847
Reply
#5

Muito Obrigado a todos, mas o do [NoiX]Eduardo й sу pra admin rcon Standby, PT o do outro tуpico ele ganha ao entrar numa moto, Coe2 me ajudou mesmo, e pra tirar? tem como deixar o mesmo comando?
Reply
#6

assim

pawn Код:
CMD:tirar(playerid)
{
    for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
    }
    return 1;
}
Reply
#7

pawn Код:
if (strcmp(cmd,"/capacete", true) == 0)
    {
        SetPlayerAttachedObject( playerid, 5, 18645, 2, 0.07, 0, 0, 88, 75, 0 );
        SendClientMessage(playerid, ROXO, "Vocк colocou seu capacete!");
        return 1;
    }
//>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    if (strcmp(cmd,"/capacete", true) == 0)
    {
        for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
        SendClientMessage(playerid, ROXO, "Vocк tirou seu capacete!");
        }
        return 1;
    }
Tentei assim mas nгo funcionou? nгo tem mesmo como deixar o mesmo comando?
Reply
#8

pawn Код:
// la no topo da gm junto com as outras news
new temcapacete[MAX_PLAYERS] = 0;
 
// juntos com os comandos

if (strcmp(cmd,"/capacete", true) == 0)
{
    if(temcapacete[playerid] == 0)
    {
        SetPlayerAttachedObject( playerid, 5, 18645, 2, 0.07, 0, 0, 88, 75, 0 );
        temcapacete[playerid] = 1;
        SendClientMessage(playerid, ROXO, "Vocк colocou seu capacete!")
        return 1;
    }
    if(temcapacete[playerid] == 1)
    {
        for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
            temcapacete[playerid] = 0;
            SendClientMessage(playerid, ROXO, "Vocк tirou seu capacete!");
        }
    }
    return 1;
}
Reply
#9

Deu esse erro:
pawn Код:
C:\Users\Nгo saberб nada sobre mim\Desktop\Nome da pasta do GM\gamemodes\NAOPRECISASABER.pwn(16989) : error 001: expected token: ";", but found "return"
Reply
#10

desculpa

pawn Код:
// la no topo da gm junto com as outras news
new temcapacete[MAX_PLAYERS] = 0;
 
// juntos com os comandos

if (strcmp(cmd,"/capacete", true) == 0)
{
    if(temcapacete[playerid] == 0)
    {
        SetPlayerAttachedObject( playerid, 5, 18645, 2, 0.07, 0, 0, 88, 75, 0 );
        temcapacete[playerid] = 1;
        SendClientMessage(playerid, ROXO, "Vocк colocou seu capacete!");
        return 1;
    }
    if(temcapacete[playerid] == 1)
    {
        for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
            temcapacete[playerid] = 0;
            SendClientMessage(playerid, ROXO, "Vocк tirou seu capacete!");
        }
    }
    return 1;
}
pronto ta arrumado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)