Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Include] traps

$
0
0
Traps

Traps is an include which create spheres and when someone enter one of those sphere they create an explosion wich kills the player that entered the that sphere its like mines

the script i used in the video:

Code:

#include <a_samp>
#include <Traps>
#include <izcmd>

static trap;

CMD:ctrap(playerid, params[])
{
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        CreateTrap(trap, x, y, z);
        trap ++;
        return 1;
}

CMD:dtrap(playerid, params[])
{
        trap --;
        DestroyTrap(trap);
        return 1;
}

Function and Callbacks:

CreateTrap(trapid, Float:x, Float:y, Float:z)

DestroyTrap(trapid)


DestroyTrap(trapid)

DestroyAllTraps(trapid)

OnPlayerEnterTrap(playerid, trapid) <- CallBack

LINK: https://pastebin.com/FbA9AkCe


VIDEO: https://www.youtube.com/watch?v=EX16hEyicI0


CREDITS:
CREDITS:ME: for traps
CREDITS:Y_LESS: for y_hooks
CREDITS:INCOGNITO: for streamer

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>