Posts: 1,029
Threads: 96
Joined: May 2010
Reputation:
0
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?
Posts: 2,896
Threads: 11
Joined: Sep 2008
Reputation:
0
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.
Posts: 1,029
Threads: 96
Joined: May 2010
Reputation:
0
I found one , but got errors in the script.
Posts: 1,029
Threads: 96
Joined: May 2010
Reputation:
0
Didn't got Teams defined yet because they are just bugged now..
Posts: 1,419
Threads: 264
Joined: Jan 2009
Reputation:
0
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;
}
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Fail coding.
Will crash the server for sure, because you're creating 500 objects (the size of MAX_PLAYERS) that don't exist.
Posts: 1,029
Threads: 96
Joined: May 2010
Reputation:
0
Help pls. No team needed, I'll just make a private cmd.