Spawn At DM After Death
#1

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?
Reply
#2

pawn Код:
if(DM1[playerid] = true)
should be

pawn Код:
if(DM1[playerid] == true)
Reply
#3

Quote:
Originally Posted by MadeMan
pawn Код:
if(DM1[playerid] = true)
should be

pawn Код:
if(DM1[playerid] == true)
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)