Spawn At DM After Death - 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: Spawn At DM After Death (
/showthread.php?tid=100254)
Spawn At DM After Death -
BP13 - 03.10.2009
need to make it so after u die at a dm you will auto respaw at it. I did have this:
pawn Код:
new DMZone[MAX_PLAYERS];
dcmd_grove(playerid, params[])
{
#pragma unused params
SetPlayerSkin(playerid, 105);
SetPlayerPos(playerid, 2495.8198,-1707.5964,1018.3368);
DMZone[playerid] = 16;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(DMZone[playerid] >= 16)
{
SetPlayerSkin(playerid, 105);
SetPlayerPos(playerid, 2495.8198,-1707.5964,1018.3368);
}
etc. But it spawned you at every DM before you got to the one you want (for a second or two) So I am trying to use bool's. This is what I have tried
pawn Код:
new bool: DM1[MAX_PLAYERS];
dcmd_area51(playerid, params[])
{
#pragma unused params
DM1[playerid] = true; etc...
public OnPlayerSpawn(playerid)
{
if(DM1[playerid] = true) //<-- something not right here
{
etc...
I get the warning
Код:
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(20312) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Can someone help me out? what am I doing wrong?
Re: Spawn At DM After Death -
MadeMan - 03.10.2009
should be
pawn Код:
if(DM1[playerid] == true)
Re: Spawn At DM After Death -
BP13 - 03.10.2009
Quote:
Originally Posted by MadeMan
should be
pawn Код:
if(DM1[playerid] == true)
|
Thanks