SA-MP Forums Archive
[Pedido] Algemas 0.3e - 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] Algemas 0.3e (/showthread.php?tid=357994)



Algemas 0.3e - Mercurio - 09.07.2012

Alguйm poderia por as algemas 0.3e nesse meu cуdigo?

Quando o player й algemado ( Colocar as Algemas );

pawn Код:
if(strcmp(cmd, "/algemar", true) == 0)
    {
                new str[128];
                Algemado[id] = true;
                rendido[id] = 0;
                GameTextForPlayer(id, "~b~ALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|ALGEMADO| Vocк foi algemado pelo jogador %s (Motivo: %s)", sendername, MSG);
                SendClientMessage(id, 0xA9C4E4AA, str);
                SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                format(str, sizeof(str), "|ALGEMADO| Vocк algemou o jogador %s (Motivo: %s)", giveplayer, MSG);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 0);
                if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
                UsouComando[playerid][4] = 1;
                SetTimerEx("UsouComando1", 60000, false, "i", playerid);
                Desalgemarpm = SetTimerEx("Desalgemar", 1000 * 20, false, "i", id);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }
Quando o player й desalgemado, sumir as algemas e voltar ao normal;

pawn Код:
if(strcmp(cmd, "/desalgemar", true) == 0)
    {
                new str[128];
                GameTextForPlayer(id, "~b~DESALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|DESALGEMADO| Vocк foi desalgemou pelo jogador %s", sendername);
                SendClientMessage(id, 0xA9C4E4AA, str);
                format(str, sizeof(str), "|DESALGEMADO| Vocк desalgemou o jogador %s", giveplayer);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 1);
                Algemado[id] = false;
                KillTimer(Desalgemarpm);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }
Sou grato desde jб, REP.!


Re: Algemas 0.3e - CidadeNovaRP - 09.07.2012

Quote:
Originally Posted by Mercurio
Посмотреть сообщение
Alguйm poderia por as algemas 0.3e nesse meu cуdigo?

Quando o player й algemado ( Colocar as Algemas );

pawn Код:
if(strcmp(cmd, "/algemar", true) == 0)
    {
                new str[128];
                Algemado[id] = true;
                rendido[id] = 0;
                GameTextForPlayer(id, "~b~ALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|ALGEMADO| Vocк foi algemado pelo jogador %s (Motivo: %s)", sendername, MSG);
                SendClientMessage(id, 0xA9C4E4AA, str);
                SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                format(str, sizeof(str), "|ALGEMADO| Vocк algemou o jogador %s (Motivo: %s)", giveplayer, MSG);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 0);
                if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
                UsouComando[playerid][4] = 1;
                SetTimerEx("UsouComando1", 60000, false, "i", playerid);
                Desalgemarpm = SetTimerEx("Desalgemar", 1000 * 20, false, "i", id);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }
Quando o player й desalgemado, sumir as algemas e voltar ao normal;

pawn Код:
if(strcmp(cmd, "/desalgemar", true) == 0)
    {
                new str[128];
                GameTextForPlayer(id, "~b~DESALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|DESALGEMADO| Vocк foi desalgemou pelo jogador %s", sendername);
                SendClientMessage(id, 0xA9C4E4AA, str);
                format(str, sizeof(str), "|DESALGEMADO| Vocк desalgemou o jogador %s", giveplayer);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 1);
                Algemado[id] = false;
                KillTimer(Desalgemarpm);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }
Sou grato desde jб, REP.!
Nгo peзa ajuda em troca de REP por favor!
Ta ai:
pawn Код:
//TOPO
    new Algemas[MAX_PLAYERS];
   
    //COMANDOS
    if(strcmp(cmd, "/algemar", true) == 0)
    {
                new str[128];
                Algemado[id] = true;
                rendido[id] = 0;
                GameTextForPlayer(id, "~b~ALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|ALGEMADO| Vocк foi algemado pelo jogador %s (Motivo: %s)", sendername, MSG);
                SendClientMessage(id, 0xA9C4E4AA, str);
                SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                format(str, sizeof(str), "|ALGEMADO| Vocк algemou o jogador %s (Motivo: %s)", giveplayer, MSG);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 0);
                if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
                UsouComando[playerid][4] = 1;
                SetTimerEx("UsouComando1", 60000, false, "i", playerid);
                Desalgemarpm = SetTimerEx("Desalgemar", 1000 * 20, false, "i", id);
                Algemas[id] = SetPlayerAttachedObject(id, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }
    if(strcmp(cmd, "/desalgemar", true) == 0)
    {
                new str[128];
                GameTextForPlayer(id, "~b~DESALGEMADO!", 3000, 0);
                new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                format(str, sizeof(str), "|DESALGEMADO| Vocк foi desalgemou pelo jogador %s", sendername);
                SendClientMessage(id, 0xA9C4E4AA, str);
                format(str, sizeof(str), "|DESALGEMADO| Vocк desalgemou o jogador %s", giveplayer);
                SendClientMessage(playerid, 0xA9C4E4AA, str);
                TogglePlayerControllable(id, 1);
                Algemado[id] = false;
                KillTimer(Desalgemarpm);
                SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
                RemovePlayerAttachedObject(id, Algemas[id]);
        }
        else
        {
            SendClientMessage(playerid, COR_VERMELHO, "(ERRO) Vocк nгo tem permissгo!");
        }
        return 1;
    }



Re: Algemas 0.3e - Mercurio - 10.07.2012

Erro...

Linha;
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
Erro;
pawn Код:
error 017: undefined symbol "SPECIAL_ACTION_CUFFED"



Re: Algemas 0.3e - .FuneraL. - 10.07.2012

Quote:
Originally Posted by Mercurio
Посмотреть сообщение
Erro...

Linha;
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
Erro;
pawn Код:
error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
Suas Includes estгo Atualizadas?


Re: Algemas 0.3e - Bruno Alves - 10.07.2012

No meu gm ta assim e da certo '-' , tenta add no topo isso...

#define SPECIAL_ACTION_CUFFED 4


Re: Algemas 0.3e - Mercurio - 10.07.2012

Quote:
Originally Posted by Bruno Alves
Посмотреть сообщение
No meu gm ta assim e da certo '-' , tenta add no topo isso...

#define SPECIAL_ACTION_CUFFED 4
Funfou, obrigado.


Re: Algemas 0.3e - paulor - 10.07.2012

Quote:
Originally Posted by Bruno Alves
Посмотреть сообщение
No meu gm ta assim e da certo '-' , tenta add no topo isso...

#define SPECIAL_ACTION_CUFFED 4
pawn Код:
#define SPECIAL_ACTION_CUFFED 24



Re: Algemas 0.3e - Mr.Hardy - 10.07.2012

Quote:
Originally Posted by Mercurio
Посмотреть сообщение
Erro...

Linha;
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
Erro;
pawn Код:
error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
pawn Код:
#define SPECIAL_ACTION_CUFFED (24)
=D


Re: Algemas 0.3e - Bruno Alves - 10.07.2012

pq 24 ?


Re: Algemas 0.3e - paulor - 10.07.2012

Quote:
Originally Posted by Bruno Alves
Посмотреть сообщение
pq 24 ?
E pq 4 ? Affs.

Veja vc msm:

pawn Код:
#define SPECIAL_ACTION_NONE             0
#define SPECIAL_ACTION_DUCK             1
#define SPECIAL_ACTION_USEJETPACK       2
#define SPECIAL_ACTION_ENTER_VEHICLE    3
#define SPECIAL_ACTION_EXIT_VEHICLE     4
#define SPECIAL_ACTION_DANCE1           5
#define SPECIAL_ACTION_DANCE2           6
#define SPECIAL_ACTION_DANCE3           7
#define SPECIAL_ACTION_DANCE4           8
#define SPECIAL_ACTION_HANDSUP          10
#define SPECIAL_ACTION_USECELLPHONE     11
#define SPECIAL_ACTION_SITTING          12
#define SPECIAL_ACTION_STOPUSECELLPHONE 13
#define SPECIAL_ACTION_DRINK_BEER       20
#define SPECIAL_ACTION_SMOKE_CIGGY      21
#define SPECIAL_ACTION_DRINK_WINE       22
#define SPECIAL_ACTION_DRINK_SPRUNK     23
#define SPECIAL_ACTION_CUFFED           24