01.07.2011, 16:36
i got a problem when people spawn the thing that shows class and choose a class it wont apear none of the class and when you click spawn you get spawn under the map here is my class choose..
And this is place in public OnGameModeInit()
Now My OnPlayerRequestClass(playerid, classid)
And Now My Spawn
Код:
for(new i=0;i<300;i++) { if((i == 7)||(i >= 9 && i <= 41)||(i >= 43 && i <= 64)||(i >= 66 && i <= 73) ||(i >= 75 && i <= 85)||(i >= 87 && i <= 118)||(i >= 120 && i <= 148)||(i >= 150 && i <= 207) ||(i >= 209 && i <= 264)||(i >= 274 && i <= 288)||(i >= 290 && i <= 299)) { AddPlayerClass(i, -1422.8820, -287.4992, 14.1484, 269.1088, 4, 1, 29, 400, 31, 550); } }
Now My OnPlayerRequestClass(playerid, classid)
Код:
public OnPlayerRequestClass(playerid, classid) { GameTextForPlayer(playerid, "~g~~h~WELCOME", 1500, 6); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2508.1831,-1685.4116,13.5606); SetPlayerFacingAngle(playerid, 82.79460); SetPlayerCameraPos(playerid, 2498.9,-1686.1,13.4); SetPlayerCameraLookAt(playerid, 2498.9,-1686.1,13.4); SetPlayerTeam(playerid,2); ApplyAnimation(playerid,"GANGS","DEALER_IDLE",4.1,1,1,1,1,1); return 1; }
Код:
public OnPlayerSpawn(playerid) { new string[500]; new skin = GetPlayerSkin(playerid); if(skin == 294 || skin == 115 || skin == 19 || skin == 287 || skin == 165) { if (IsPlayerAdmin(playerid)) { SetPlayerColor(playerid,0xFF000000); SetPlayerHealth(playerid, 99999); SetPlayerArmour(playerid, 99999); DutyLabel[playerid] = Create3DTextLabel("Owner On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1); Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0); GivePlayerWeapon(playerid, 42, 10000); GivePlayerWeapon(playerid, 39, 10000); GivePlayerWeapon(playerid, 38, 10000); GivePlayerWeapon(playerid, 34, 10000); GivePlayerWeapon(playerid, 31, 10000); GivePlayerWeapon(playerid, 29, 10000); GivePlayerWeapon(playerid, 27, 10000); GivePlayerWeapon(playerid, 24, 10000); GivePlayerWeapon(playerid, 40, 1); GivePlayerWeapon(playerid, 10, 1); GivePlayerWeapon(playerid, 9, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000); } else { new pNAME[MAX_PLAYERS]; SendClientMessage(playerid, COLOR_RED,"***ONLY ADMINS MAY USE THIS SKIN, PLEASE CHOOSE AGAIN !***"); GameTextForPlayer(playerid,"~r~KICKED !",2500,0); GetPlayerName(playerid,pNAME,32); format(string,sizeof(string),"%s tried to get the rcon admin skin but he's BEEN KICKED !",pNAME); SendClientMessageToAll(COLOR_RED,string); Kick(playerid); } } if(!GetPlayerColor(playerid)) { SetPlayerColor(playerid, 0x94ED40FF); SendClientMessage(playerid, ~1, #lol); } AutoNOS[playerid] = true; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); ShowPlayerDialog(playerid, 42, DIALOG_STYLE_MSGBOX,"Server Rules", "Rule 1:No Hacking\nRule 2:No Imature Behavioure\nRule 3:No Racism\nRule 4:Respect all players\nRule 5:Do not be abusive to Admins or KICK/BAN\nRule 6:Have Fun!\nDecline our rules you will be KICKED!", "Accept", "Decline"); if(GetPlayerScore(playerid) < 0) { format(string,sizeof(string),"Ha ha ha, %s is a noob because he has %d points.",name,GetPlayerScore(playerid)); SendClientMessageToAll(COLOR_SERVERD,string); } SetPlayerArmour(playerid,50); return 1; }