in / dm remain 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: in / dm remain how to ? (
/showthread.php?tid=149731)
in / dm remain how to ? -
RobShakur - 23.05.2010
my english:
i dont know ?
i must have it in /dm when i was killing that im again in dm my dm is when im kill i must new conect /dm
i will a cmd that i will leave dm /exit
******:
I do not know what to do
I have my script dm so I enter again and again / dm has
how do I do it if I am killed I will stay in the / dm?
and if I want to leave dm / exit
Re: in / dm remain how to ? -
Hiddos - 23.05.2010
Googling for sa-mp script, what's next.
Use PVars for the player. Set them to 1 or something when he joins the DM, and check at OnPlayerSpawn if the PVar is 1 and if so, put him back in the DM.
Re: in / dm remain how to ? -
woot - 23.05.2010
pawn Код:
if(!strcmp(cmdtext,"/dm", true))
{
// stuff here ..
SetPVarInt(playerid, "IsDM", 1);
}
if(!strcmp(cmdtext,"/exit", true))
{
// stuff here ..
SetPVarInt(playerid, "IsDM", 0);
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "IsDM") == 1)
{
// Warp him back to the DM zone
SetPlayerPos(playerid, x_to_dm, y_to_dm, z_to_dm);
}
}
Re: in / dm remain how to ? -
Think - 23.05.2010
EDIT: Above answer was faster and will work good enough for you