20.03.2009, 15:28
Код:
public OnPlayerSpawn(playerid) { if(PlayerInfo[playerid][logged] == 0) { SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------"); SendClientMessage(playerid,COLOR_YELLOW, "You have not logged in yet!"); SendClientMessage(playerid,COLOR_YELLOW, "Please register your current player name with '/register [password]' and login with '/login [password]'"); SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------"); } SetPlayerColor(playerid,COLOR_GREY); switch(PlayerInfo[playerid][team]) { case TEAM_BALLA: { GivePlayerWeapon(playerid,32,100); GivePlayerWeapon(playerid,25,100); GivePlayerWeapon(playerid,4,1); SetPlayerColor(playerid,COLOR_PINK); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_GROVE: { GivePlayerWeapon(playerid,28,200); GivePlayerWeapon(playerid,30,200); GivePlayerWeapon(playerid,4,1); SetPlayerColor(playerid,COLOR_GREEN); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_VAGO: { GivePlayerWeapon(playerid,34,200); GivePlayerWeapon(playerid,24,400); GivePlayerWeapon(playerid,28,800); SetPlayerColor(playerid,COLOR_YELLOW); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_AZTEC: { GivePlayerWeapon(playerid,24,400); GivePlayerWeapon(playerid,31,800); GivePlayerWeapon(playerid,28,800); SetPlayerColor(playerid,COLOR_BLUE); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_TRIAD: { GivePlayerWeapon(playerid,27,100); GivePlayerWeapon(playerid,30,200); GivePlayerWeapon(playerid,4,1); SetPlayerColor(playerid,COLOR_YELLOW); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_MEDIC: { GivePlayerWeapon(playerid,27,100); GivePlayerWeapon(playerid,28,200); GivePlayerWeapon(playerid,4,1); SetPlayerColor(playerid,COLOR_LIGHTBLUE); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_NT: { GivePlayerWeapon(playerid,31,800); GivePlayerWeapon(playerid,24,800); GivePlayerWeapon(playerid,27,800); SetPlayerColor(playerid,COLOR_BRIGHTRED); SetPlayerPos(playerid,2558.4133,1562.1017,10.8203); return 1; } case TEAM_COP: { GivePlayerWeapon(playerid,24,400); GivePlayerWeapon(playerid,31,400); GivePlayerWeapon(playerid,26,400); SetPlayerColor(playerid,COLOR_BLUE); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_ARMY: { GivePlayerWeapon(playerid,24,100); GivePlayerWeapon(playerid,31,200); GivePlayerWeapon(playerid,26,1); SetPlayerColor(playerid,COLOR_GREEN); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } case TEAM_CIV: { GivePlayerWeapon(playerid,28,200); GivePlayerWeapon(playerid,30,200); GivePlayerWeapon(playerid,4,1); SetPlayerColor(playerid,COLOR_ORANGE); if(PlayerInfo[playerid][logged] == 1 && PlayerInfo[playerid][bowner] == 1) { SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][bowned]][xpos],BizInfo[PlayerInfo[playerid][bowned]][ypos],BizInfo[PlayerInfo[playerid][bowned]][zpos]); SendClientMessage(playerid,COLOR_GREEN,"You have been spawned at the entrance to your business"); return 1; } SetPlayerRandomSpawn(playerid); } } GivePlayerWeapon(playerid,4,1); return 1; } }