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;
}
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;
}
Alguйm poderia por as algemas 0.3e nesse meu cуdigo?
Quando o player й algemado ( Colocar as Algemas ); pawn Код:
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;
}
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
Erro...
Linha; pawn Код:
pawn Код:
|
No meu gm ta assim e da certo '-' , tenta add no topo isso...
#define SPECIAL_ACTION_CUFFED 4 |
No meu gm ta assim e da certo '-' , tenta add no topo isso...
#define SPECIAL_ACTION_CUFFED 4 |
#define SPECIAL_ACTION_CUFFED 24
Erro...
Linha; pawn Код:
pawn Код:
|
#define SPECIAL_ACTION_CUFFED (24)
#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