Posts: 30
Threads: 8
Joined: Aug 2010
Reputation:
0
Anyone know the script that if Player %s is dead in death match area re spawned in ?
example
%example is dead when is spawn again get in the death match area just if write /leavedm ! please help if you know ,Do not skimp.
Posts: 1,121
Threads: 139
Joined: Nov 2009
Reputation:
0
I think he means, if the player is in a dmzone and he dies for example. He'll respawn in the dmzone again.
Posts: 761
Threads: 124
Joined: Nov 2010
Reputation:
0
u have to set up a variable e.g.
new entereddm[MAX_PLAYERS];
As soon as a player enters a dm area
entereddm[playerid]++;
As soon as he leaves entereddm[playerid]--;
And do an if function for example to check if the players has an entereddm value of 1
If yes do it like this player is spawned in the dm area again else spawn or SetPlayerPos anywhere else.
I dont have time noe to explain better
Posts: 1,152
Threads: 11
Joined: Feb 2010
Reputation:
0
Why ++ and --?
You can better set it to IsInDM[playerid] = 1; then SetPlayerPos in DM area and if its 0 you can spawn them somewhere else
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
Create a varible like IsInDM..
new IsInDM[MAX_PLAYERS];
Now call that varible at the place that takes the player to the dm
e.g
IsInDM[playerid] = 1;
Then make a if statement on onplayerspawn like
if(IsInDm[playerid] == 1)
{
// add setplayerpos or place u wanna put the player..
}