SA-MP Forums Archive
Stupid DM bug - 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: Stupid DM bug (/showthread.php?tid=99175)



Stupid DM bug - FrostBytez - 26.09.2009

I run a server with some DM's, people teleport out of the DM with weapons,

I'm really new to scripting, Can someone give me a pawn code to remove weapons upon leaving the DM zone or disable commands
and add a /exitdm command?


Stupid DM bug - [NoV]LaZ - 26.09.2009

ResetPlayerWeapons( playerid );
________
Suzuki Dr-Z400


Re: Stupid DM bug - MenaceX^ - 26.09.2009

How do you check when a player leaves the area?


Re: Stupid DM bug - brett7 - 26.09.2009

check()
{
for(i = 0; i < maxPlayers; i++)
{
if(!IsPlayerConnected(i))
{
if(!playertopoint(i, x, y, z, radius))
ResetWeapon(i)
}
}
}


}


Re: Stupid DM bug - Correlli - 26.09.2009

Quote:
Originally Posted by brett7
if(!IsPlayerConnected(i))
{
}
Why are you checking if player ISN'T connected?


Re: Stupid DM bug - FrostBytez - 28.09.2009

Thanks Bret,
The code worked awesome, Thanks alot!