Help with DMs
#1

Well I am making a [FS] to refreshen up on my skills on scripting since I left scripting for almost a year! So I decided to come back and refreshing up by making a small [FS]. I have a question.
It is a /dm1 /dm2 and so on type of [FS]. So i want to ask. When I have a player /dm1 i set their virtual worlds and I have the random spawns. But my question is!

When they die in the DM, how do I get them to respawn in the DM area, and when they /cancel, they spawn back outside?

Please help and if you need more clarification just tell me. Sorry I forgot much about scripting xD
Reply
#2

Dont ask me to ad a code but I will tell you, logically.
First assign player a variable, if it's true he is in DM area if it's false he's not.
So when he spawns and variable is true, set his pos to DM area. Also remember to set the variable to false or true when he types /canceldm, or /startdm.
Reply
#3

Quote:
Originally Posted by admantis
Посмотреть сообщение
Dont ask me to ad a code but I will tell you, logically.
First assign player a variable, if it's true he is in DM area if it's false he's not.
So when he spawns and variable is true, set his pos to DM area. Also remember to set the variable to false or true when he types /canceldm, or /startdm.
LMAO dude thats what I asked how to do in the topic? Why did you just retype? Thats what I need help with

@Hoboforic
Well Ill have to see if that works. But I am making a filterscript for an add on for if a server wants DMs. So like, if they die, I need something to check and see if they are in dm = true then they respawn in DM area. But if false it spawns whereever the GAMEMODE has their own spawns xD
Reply
#4

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
When they die, they re-spawn ^^ if you set a variable and check it OnPlayerSpawn. (and then set there XYZ)
Yes so how do i set variable. Can u pleaseshow small example? pls? i am coming back freshly to scripting so sorry ^.^
Reply
#5

Pls?
Reply
#6

Add if statements and a varible like IsPlayerInDM[playerid] Then call it, once its called make another if statement. and inside, add the setplayerpos functions and other various needs

-Lorenc
Reply
#7

mh..SetSpawnInfo could be usefull for you to
Reply
#8

Wow thanks for helping me but I figured this out after maybe the 3rd post xDD. So pretty much sorry for making you do that work Hoborific. And thnaks Lorenc_. But ye thanks for you helping but I figured it out!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)