Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerSpawn(playerid)
- {
- gIsPlayerAlive{playerid} = 1;
- gPauseKillWarnings{playerid} = 0; // Reset the pause warnings
- if (GetPlayerVirtualWorld(playerid) != 0) SetPlayerVirtualWorld(playerid, 0); // Default virtual world
- spec[playerid] = 0;
- new string[128],string2[128];
- if(pInfo[playerid][pLogged] == 0)
- {
- SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Trying to spawn without being logged in. Won't work buddy.");
- printf("%s has been kicked for trying to spawn without being logged in!", PlayerName(playerid));
- format(string,sizeof(string), ""chat""COLOR_SPAWN"[To Admins] %s[%d] got kicked for trying to spawn without being logged in!",PlayerName(playerid),playerid);
- SendMessageToAdmins(-1,string);
- format(string2, sizeof string2, "5%s[%d] got kicked for trying to spawn without being logged in!", PlayerName(playerid),playerid);
- IRC_GroupSay(gGroupID, IRC_CHANNEL,string2);
- Kicking[playerid] =1;
- SetTimer("KickPlayer",700,0);
- }
- if(GameMinutes == 7)
- {
- HumanSetup(playerid);
- }
- playersAliveCount++;
- CheckToStartMap();
- SetPlayerInterior(playerid,Map[Interior]);
- 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_ZOMBIE)
- {
- switch(random(6))
- {
- case 0: pInfo[playerid][pZombieClass] = Zombie,setClass(playerid);
- case 1: pInfo[playerid][pZombieClass] = HUNTER,setClass(playerid);
- case 2: pInfo[playerid][pZombieClass] = BIGZOMBIE,setClass(playerid);
- case 3: pInfo[playerid][pZombieClass] = BOOMERZOMBIE,setClass(playerid);
- case 4: pInfo[playerid][pZombieClass] = Witch,setClass(playerid);
- case 5: pInfo[playerid][pZombieClass] = Fasterzombie,setClass(playerid);
- }
- }
- if(team[playerid] == TEAM_HUMAN)
- {
- HumanSetup(playerid);
- pInfo[playerid][pHumanClass] = Survivor,pInfo[playerid][pZombieClass] = Zombie,SetPlayerPos(playerid,Map[HumanSpawnX],Map[HumanSpawnY],Map[HumanSpawnZ]),setClass(playerid);
- }
- else
- {
- SetPlayerPos(playerid,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]);
- }
- sendClassMessage(playerid);
- SpawnVars(playerid);
- if(team[playerid] == TEAM_ZOMBIE)
- {
- SetPlayerColor(playerid,COLOR_ZOMBIE);
- }
- else
- {
- SetPlayerColor(playerid, COLOR_HUMAN);
- }
- new pname[128];
- GetPlayerName(playerid,pname,sizeof(pname));
- format(string, sizeof(string), "15[SPAWN] %s(%d) Has Spawned",pname,playerid);
- IRC_GroupSay(gGroupID, IRC_CHANNEL,string);
- if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement