SA-MP Forums Archive
Deploy cone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Deploy cone (/showthread.php?tid=313234)



Deploy cone - John Rockie - 25.01.2012

Hello, I've been trying to script this with no success. lol
So basically when a player does /cone
a traffic cone is created on their feet.


Re: Deploy cone - [ABK]Antonio - 25.01.2012

Like this?

pawn Код:
CMD:cone(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        CreateObject(1238, X, Y, Z, 0, 0, 0, 0);
    }
    return 1;
}



Re: Deploy cone - Steven82 - 25.01.2012

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
Like this?

pawn Код:
CMD:cone(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        CreateObject(1238, X, Y, Z, 0, 0, 0, 0);
    }
    return 1;
}
Exactly how it should be. But when creating the cone, your going to need to lower the z cord because the cone will be in the middle of the players body if not lowered. And a way to check all the cones that have been created, so you can easily create a removal system.