Position Loads
#3

Here it is:
pawn Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerSpectating(playerid, false);
    // Anti F4 Bug - Logging/Registering
    if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
    {
        if(IsPlayerNPC(playerid)) return 1;
        SetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]),
        SetPlayerJoinCamera(playerid);
        SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        new file[64];
        format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
        // Player isn't banned
        if(dini_Int(file, "AdminAccount") == 1)
        {
            format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
            SetPlayerName(playerid, dini_Get(file, "OldName"));
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            ShowDialog(playerid, 2);
        }
        if(!dini_Exists(file))
        {
            ShowDialog(playerid, 1);
            return 1;
        }
        else
        {
            ShowDialog(playerid, 2);
        }
        return 1;
    }
    // Actual Spawning
    ResetPlayerWeapons(playerid);
    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
      new npcname[MAX_PLAYER_NAME];
      GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
      if(!strcmp(npcname, "GOD", true)) //Checking if the NPC's name is GOD
      { //Putting the NPC into the vehicle we created for it.
        return 1;
      }
      return 1;
    }
    if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
    {
        FalseBan[playerid] = 0;
        SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
        SpawnChar(playerid);
    }
    if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
    return 1;
}
Reply


Messages In This Thread
Position Loads - by Necip - 03.06.2013, 10:23
Re: Position Loads - by RenSoprano - 03.06.2013, 10:37
Re: Position Loads - by Necip - 03.06.2013, 10:42
Re: Position Loads - by Necip - 03.06.2013, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)