Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1.  
  2. public OnPlayerSpawn(playerid)
  3. {
  4. gIsPlayerAlive{playerid} = 1;
  5. gPauseKillWarnings{playerid} = 0; // Reset the pause warnings
  6. if (GetPlayerVirtualWorld(playerid) != 0) SetPlayerVirtualWorld(playerid, 0); // Default virtual world
  7. spec[playerid] = 0;
  8. new string[128],string2[128];
  9. if(pInfo[playerid][pLogged] == 0)
  10. {
  11. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Trying to spawn without being logged in. Won't work buddy.");
  12. printf("%s has been kicked for trying to spawn without being logged in!", PlayerName(playerid));
  13. format(string,sizeof(string), ""chat""COLOR_SPAWN"[To Admins] %s[%d] got kicked for trying to spawn without being logged in!",PlayerName(playerid),playerid);
  14. SendMessageToAdmins(-1,string);
  15. format(string2, sizeof string2, "5%s[%d] got kicked for trying to spawn without being logged in!", PlayerName(playerid),playerid);
  16. IRC_GroupSay(gGroupID, IRC_CHANNEL,string2);
  17. Kicking[playerid] =1;
  18. SetTimer("KickPlayer",700,0);
  19. }
  20. if(GameMinutes == 7)
  21. {
  22. HumanSetup(playerid);
  23. }
  24. playersAliveCount++;
  25. CheckToStartMap();
  26. SetPlayerInterior(playerid,Map[Interior]);
  27.  
  28.  
  29. if(pInfo[playerid][Frozen] == 1) //Get the info outta the enum and check if the player is still frozen
  30. {
  31. TogglePlayerControllable(playerid,0); //Won't let the player move
  32. SendClientMessage(playerid,COLOR_RED,"WARNING: You are still frozen!"); //Send him a message
  33. }
  34. if(team[playerid] == TEAM_ZOMBIE)
  35. {
  36. switch(random(6))
  37. {
  38. case 0: pInfo[playerid][pZombieClass] = Zombie,setClass(playerid);
  39. case 1: pInfo[playerid][pZombieClass] = HUNTER,setClass(playerid);
  40. case 2: pInfo[playerid][pZombieClass] = BIGZOMBIE,setClass(playerid);
  41. case 3: pInfo[playerid][pZombieClass] = BOOMERZOMBIE,setClass(playerid);
  42. case 4: pInfo[playerid][pZombieClass] = Witch,setClass(playerid);
  43. case 5: pInfo[playerid][pZombieClass] = Fasterzombie,setClass(playerid);
  44. }
  45.  
  46. }
  47. if(team[playerid] == TEAM_HUMAN)
  48. {
  49. HumanSetup(playerid);
  50. pInfo[playerid][pHumanClass] = Survivor,pInfo[playerid][pZombieClass] = Zombie,SetPlayerPos(playerid,Map[HumanSpawnX],Map[HumanSpawnY],Map[HumanSpawnZ]),setClass(playerid);
  51. }
  52. else
  53. {
  54. SetPlayerPos(playerid,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]);
  55. }
  56. sendClassMessage(playerid);
  57. SpawnVars(playerid);
  58. if(team[playerid] == TEAM_ZOMBIE)
  59. {
  60. SetPlayerColor(playerid,COLOR_ZOMBIE);
  61. }
  62. else
  63. {
  64. SetPlayerColor(playerid, COLOR_HUMAN);
  65. }
  66. new pname[128];
  67. GetPlayerName(playerid,pname,sizeof(pname));
  68. format(string, sizeof(string), "15[SPAWN] %s(%d) Has Spawned",pname,playerid);
  69. IRC_GroupSay(gGroupID, IRC_CHANNEL,string);
  70. if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
  71. return 1;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement