DM Area Help !
#1

i tryied to add when i enter the dm area and someone kills me im automaticly spawned back there but the problem is when i exit DM and someone kill me outside it teleports me to DM area what i need to do so when someone kills me outside the dm i will be spawned at spawn point not in DM code
Код:
new dmevent[MAX_PLAYERS];

dmevent[playerid] = 1; i putted this on DM teleport command

//OnPlayerSpawn

if(dmevent[playerid] == 1)
{
	// code for callback
}
if(dmevent[playerid] == 1) on /exitdm command
Reply
#2

When player leaves set the dmevent to 0
then OnPlayerSpawn if dmevent is 0 spawn him outside.
Reply
#3

oh well i forgot about this i done that and it works but i added on other dm areas so if(dmevent[playerid] == 1)
and if(dmevent[playerid] == 2) until if(dmevent[playerid] == 7) and added on /exitdm if(dmevent[playerid] == 1) until if(dmevent[playerid] == 7) and if(dmevent[playerid] == 1) until if(dmevent[playerid] == 7) onplayerspawn and when i type /exitdm it teleports me back to spawnplace but when i use /kill onspawnplace it teleports me back to DM thats the problem
Reply
#4

Well like i mention above.
Set dmevent to 0 when player uses /kill or some commands that make them spawn outside
Not sure. But check if player's variable dmevent is 1, 2 until it reach 7 when its in dmevent 1 to 7
then Set the dmevent to 1 to 7. then if player's variable dmevent is 0. then set the dmevent to 0.

Not sure untested.
Reply
#5

well i done all that but no changes when ui type /exitdm it teleports me on spawnplace but when i die after i type /exitdm it teleports me back to the last DM area idk why? i added dmevent[playerid] = 0; in exitdm and onplayerspawn. and all other things where it should be
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)