SA-MP Forums Archive
Help with DMs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with DMs (/showthread.php?tid=201711)



Help with DMs - ToPhrESH - 22.12.2010

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


Respuesta: Help with DMs - admantis - 22.12.2010

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.


Re: Respuesta: Help with DMs - ToPhrESH - 22.12.2010

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


Re: Help with DMs - ToPhrESH - 22.12.2010

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 ^.^


Re: Help with DMs - ToPhrESH - 22.12.2010

Pls?


Re: Help with DMs - Lorenc_ - 22.12.2010

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


Re: Help with DMs - boelie - 22.12.2010

mh..SetSpawnInfo could be usefull for you to


Re: Help with DMs - ToPhrESH - 24.12.2010

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!