dm spawn - 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)
+--- Thread: dm spawn (
/showthread.php?tid=313788)
dm spawn -
Aloushi - 27.01.2012
how to make when player kill in dm player spawn in dm and when type leavedm player leave dm
Re: dm spawn -
niels44 - 27.01.2012
maybe you can use something of when a player is in range of point of where your DM is that it gets spawned at the spot where you want it to spawn.. something like this:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(playerid, Float:range,Float:x,Float:y,Float:z))
{
SetPlayerPos(playerid, yourpositions);
}
return 1;
}
for more info about the isplayerinrangeofpoint go to this:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
i hope i helped you a bit
greets niels
Re: dm spawn -
Aloushi - 27.01.2012
thxx for help
Re: dm spawn -
niels44 - 27.01.2012
np i always want to help ppl if i can XD BTW: tell me if it works XD i am not sure
Re: dm spawn -
Konstantinos - 27.01.2012
it will not work. When a player dies he can't spawn.
pawn Код:
// At The Top
new
IsPlayerInDM[ MAX_PLAYERS ];
// On you command to enter DM
IsPlayerInDM[ playerid ] = 1;
// OnPlayerSpawn Callback
if( IsPlayerInDM[ playerid ] == 1)
{
SetPlayerPos(...); // DM's Coordinates
}
// On command to leave DM
IsPlayerInDM = 0;
SetPlayerPos(...); // somewhere else
Re: dm spawn -
Aloushi - 27.01.2012
thxx afor help
AW: dm spawn -
Saize - 03.12.2012
Why it doesnґt it work?
Re: dm spawn -
Swisher - 24.01.2014
Quote:
Originally Posted by Konstantinos
it will not work. When a player dies he can't spawn.
pawn Код:
// At The Top new IsPlayerInDM[ MAX_PLAYERS ];
// On you command to enter DM IsPlayerInDM[ playerid ] = 1;
// OnPlayerSpawn Callback if( IsPlayerInDM[ playerid ] == 1) { SetPlayerPos(...); // DM's Coordinates }
// On command to leave DM IsPlayerInDM = 0; SetPlayerPos(...); // somewhere else
|
How can i make this work for multiple dm zones?