09.07.2012, 03:57
Alguйm poderia por as algemas 0.3e nesse meu cуdigo?
Quando o player й algemado ( Colocar as Algemas );
Quando o player й desalgemado, sumir as algemas e voltar ao normal;
Sou grato desde jб, REP.!
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;
}
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;
}