Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Criado por Bruno da Silva
- // Sempre coloque os créditos !!
- //
- #include <a_samp>
- #define FILTERSCRIPT
- #include <zcmd>
- forward ApagarFogo(playerid);
- public ApagarFogo(playerid) {
- SendClientMessage(playerid, -1, "[Info] A fogueira foi apagada !! ");
- /*
- TextDrawHideForPlayer(playerid, introTextDraw2);
- TextDrawHideForPlayer(playerid, introTextDraw3);
- TextDrawHideForPlayer(playerid, introTextDraw5);
- */
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, true);
- DestroyObject(GetPVarInt(playerid, "fogueira2"));
- DestroyObject(GetPVarInt(playerid, "fogueira1"));
- ClearAnimations(playerid);
- ClearAnimations(playerid);
- return true;
- }
- forward TerminarFogueira(playerid);
- public TerminarFogueira(playerid) {
- static
- Float:px,
- Float:py,
- Float:pz;
- GetObjectPos(GetPVarInt(playerid, "fogueira1"), px, py, pz);
- ClearAnimations(playerid);
- SetPVarInt(playerid, "Fogueira", SetTimerEx("ApagarFogo", 15000, false, "i", playerid));
- SendClientMessage(playerid, -1, "[Info] Você acendeu a fogueira");
- ApplyAnimation(playerid,"MISC","SEAT_LR",4.1,0,0,0,1,1);
- SetPVarInt(playerid, "fogueira2", CreateObject(18688, px,py,pz-1.47,0.0,0.0,0.0));
- return true;
- }
- cmd(fogueira, playerid, params[]) {
- TogglePlayerControllable(playerid, false);
- ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,1,0);
- static
- Float:px,
- Float:py,
- Float:pz,
- Float:pa;
- GetPlayerPos(playerid, px, py, pz);
- GetPlayerFacingAngle(playerid, pa);
- px += floatsin ( -pa, degrees) * 2.5;
- py += floatcos ( -pa, degrees) * 2.5;
- SetPVarInt(playerid, "fogueira1", CreateObject(841, px,py,pz-0.5,0.0,0.0,0.0));
- SetPlayerCameraPos(playerid, px +2, py+2, pz+3.5);
- SetPlayerCameraLookAt(playerid, px, py, pz);
- /*
- TextDrawShowForPlayer(playerid, introTextDraw2);
- TextDrawShowForPlayer(playerid, introTextDraw3);
- TextDrawShowForPlayer(playerid, introTextDraw5);
- */
- SetPVarInt(playerid, "Fogueira", SetTimerEx("TerminarFogueira", 5000, false, "i", playerid));
- ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,1,0);
- return true;
- }
Add Comment
Please, Sign In to add comment