SA-MP Forums Archive
How to .............. - 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: How to .............. (/showthread.php?tid=186196)



How to .............. - MBX97 - 27.10.2010

hi , when player enter the dm and ge killed , he/she always return back to the spawn set , how should i post any thing in my GM that leads to when he dies in the /dm go to the /dm again but when he use the /exit he goes to the spawn set position
i mean :
goto /dm > killed > spawn in the spawn set ( i hate that )
the right 1 that i want to do it
goto /dm > killed > return back to the /dm untill use the /exit
, i hope you guyz can help me
thanks


Re: How to .............. - iggy1 - 28.10.2010

Use a variable to check if a player is in the dm, something like this
pawn Код:
new indm[MAX_PLAYERS];//at the top of script


COMMAND:dm(playerid, params[])
{
    indm[playerid] = 1;//put this wherever you set the players position
    return 1;
}

public OnPlayerSpawn(playerid)//you might be better using a timer in onplayerdeath
{
    if(indm[playerid] == 1)
    {
        SetPlayerPos(playerid, x, y, z);// this might be buggy, if it is use a short timer
    }
    return 1;
}



Re: How to .............. - MBX97 - 28.10.2010

i have no timers


Re: How to .............. - MBX97 - 28.10.2010

and i dont get you , cuz i don't use params in my GM and please get me another code that return the player to the dm
and fast btw i added you on xfire , so accept me


Re: How to .............. - iggy1 - 28.10.2010

I'm not signed in untill tommorow now ill add you then. Try to ignore the params thing just put "indm[playerid] = 1;" inside your command where you teleport the player to the dm. Then (to be safe) in OnPlayerDeath check if the player is in the dm with the variable you made then set a 500ms timer. Inside that timer set the players position back into the deathmatch.