Auto-join DM.
#1

Hello.. Can someone tell me how to make a DM auto-join script? :/
i.e. If a player dies in a DM, he gets spawn in the DM automatically.
Thank you :>
Reply
#2

Set a var to players when they join the dm on command, if they spawn check the var if it is 1, if it is one he is in dm. Set the var to zero if they leave in dm by command or disconnect

i am on mobile cant provide codes
Reply
#3

Like:-
pawn Код:
if(IsPlayerInDM[playerid] == 1)
{
     SpawnInDM(playerid)
     return 1;
}
Reply
#4

yes like that on player spawn
Reply
#5

Ok I get that.. BUT what if there is more than 1 DM zones?
How will it identify from which DM zone the player died and respawn to that particular DM zone? :/
Reply
#6

add var
for example
Код:
public OnPlayerSpawn(playerid)
{
if(EDM[playerid] == 1)

 //your code
}

{
if(EDM1[playerid] == 1)

 //your code
}
{
if(EDM2[playerid] == 1)

 //your code
}
something like these
Reply
#7

or you can just set var to one for dm one set var to two to fm two and so on, instead of wasting variables and memories
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)