Need To Fix ~ msg coming 2times in game
#1

check why gm sending 2 msg i even put one
or should i show code antoher ?

OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsSpecing[playerid] == 1)
    {
        SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// Remember earlier we stored the positions in these variables, now we're gonna get them from the variables.
        SetPlayerInterior(playerid,Inter[playerid]);//Setting the player's interior to when they typed '/spec'
        SetPlayerVirtualWorld(playerid,vWorld[playerid]);//Setting the player's virtual world to when they typed '/spec'
        IsSpecing[playerid] = 0;//Just saying you're free to use '/spec' again YAY :D
        IsBeingSpeced[spectatorid[playerid]] = 0;//Just saying that the player who was being spectated, is not free from your stalking >:D

        if(team[playerid] == TEAM_HUMAN)
        {
            HumanSetup(playerid);
            SpawnPlayer(playerid);
        }
        else if(team[playerid] == TEAM_ZOMBIE)
        {
            ZombieSetup(playerid);
            SpawnPlayer(playerid);
        }
    }

    else
    {
        playersAliveCount++;
        CheckToStartMap();
        SetPlayerInterior(playerid,Map[Interior]);

        SendClientMessage(playerid,-1,"{0095FF}You Have 7 Seconds Spawn Protection");
        SetPlayerHealth(playerid,99999);
        SetTimerEx("NoSpawnKill",7500,0,"i",playerid);

        if(team[playerid] == TEAM_ZOMBIE)
        {
            ZombieSetup(playerid);
            SetPlayerPos(playerid,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]);
        }

        if(pInfo[playerid][Frozen] == 1) //Get the info outta the enum and check if the player is still frozen
        {
            TogglePlayerControllable(playerid,0); //Won't let the player move
            SendClientMessage(playerid,COLOR_RED,"WARNING: You are still frozen!"); //Send him a message
        }

        if(team[playerid] == TEAM_HUMAN)
        {
            HumanSetup(playerid);
            switch(random(2))
            {
                case 0: SetPlayerPos(playerid,Map[HumanSpawnX],Map[HumanSpawnY],Map[HumanSpawnZ]);
                case 1: SetPlayerPos(playerid,Map[HumanSpawn2X],Map[HumanSpawn2Y],Map[HumanSpawn2Z]);
            }
        }
        sendClassMessage(playerid);
        setClass(playerid);
        SpawnVars(playerid);
    }
    return 1;
}
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)