Roadblock
#1

How to make a roadblock system?
Like when you write /roadblock it creates behind you
When you write /droadblock to delete it.
I want just a roadblock object..
Roadblock ID is 973 I think..
Can you help?
Reply
#2

There are some on these forums, so search.

And you can use check the players position behind the player (GetXYBehindPlayer (custom function, search for it)) and create the objects there.
Reply
#3

I found one , but got errors in the script.
Reply
#4

pawn Code:
if(strcmp(cmd, "/backup", true)==0)
    {
        if(TEAM_SAPD[playerid] >=1)
        {
            for(new i; i<MAX_PLAYERS; i++)
            {
                new Float:X,Float:Y,Float:Z;
                GetPlayerPos(i,X,Y,Z);
                CreateObject(i, 973, X, Y, Z, 30, 0 );

            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"You are not part of the sapd");
        }
        return 1;
    }
I think this will help
Reply
#5

Didn't got Teams defined yet because they are just bugged now..
Reply
#6

if(strcmp(cmd, "/roadblock", true)==0)
{

for(new i; i<MAX_PLAYERS; i++)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(i,X,Y,Z);
CreateObject(i, 973, X, Y, Z, 30, 0 );

}


return 1;
}
Reply
#7

Fail coding.
Will crash the server for sure, because you're creating 500 objects (the size of MAX_PLAYERS) that don't exist.
Reply
#8

Help pls. No team needed, I'll just make a private cmd.
Reply
#9

Well, Vince ssaid I made a fail coding. So now I hope he will make it perfect
Show your skills vince
Reply
#10

Code:
if(strcmp(cmd, "/roadblock", true)==0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateObject(playerid, 973, X, Y, Z, 30, 0 );
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)