| ForaN |
Дата: Среда, 25.05.2016, 09:46 | Сообщение # 4
|
Новичок
Сообщений: 21
Статус: Offline
|
Кто поможет?)
Добавлено (25.05.2016, 09:46) --------------------------------------------- Вот код из OnPlayerSpawn
Код public OnPlayerSpawn(playerid) { SetPlayerSkills(playerid); pTemp[playerid][pAbletoGun] = 2; SetPlayerColor(playerid,0xFFFFFF11); pTemp[playerid][pChangingSkin] = false; HidePlayerClothesTD(playerid); TogglePlayerControllable(playerid,0); newarmyrank(playerid);//Ïðîâåðî÷êà new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); pTemp[playerid][pWork] = 0; if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname,"bank1",true)) { NPC[0] = playerid; SetPlayerPos(NPC[0], 1431.7135,-1590.9954,367.2859); SetPlayerColor(NPC[0],CWHITE); SetSpawnInfo(NPC[0], 0, 11, 1431.7135,-1590.9954,367.2859,0,0,0,0,0,0,0); SetPlayerFacingAngle(NPC[0], 268.1645); SetPlayerSkin(NPC[0], 11); SetPlayerVirtualWorld(NPC[0], 2); SetPlayerInterior(NPC[0], 1); return 1; } } if(!pTemp[playerid][pLogined] || !pTemp[playerid][pJoined]) return 1; if(!pData[playerid][pSkin])//Åñëè èãðîê íå âûáðàë ñêèí { SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 270.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234); SetPlayerVirtualWorld(playerid,playerid); TogglePlayerControllable(playerid,0);//C>LF for(new i;i<10; i++) { TextDrawShowForPlayer(playerid,RegaSkin[i]); } CancelSelectTextDraw(playerid); SelectTextDraw(playerid,0xF2DDC6FF); if(pData[playerid][pSex] == 2) SetPlayerSkin(playerid, FemaleSkins[ChangeSkin[playerid]]); else SetPlayerSkin(playerid, MaleSkins[ChangeSkin[playerid]]); pTemp[playerid][pChoosingSkin] = true; return true; } if(pData[playerid][pJail]) { switch(pData[playerid][pPrison]) { case 1: { new JailedLSPD = random(4)+1; switch(JailedLSPD) { case 1: SetPlayerPos(playerid,226.9169,109.1662,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 2: SetPlayerPos(playerid,222.7322,108.9943,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 3: SetPlayerPos(playerid,218.7821,109.3731,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 4: SetPlayerPos(playerid,214.7852,108.9267,999.0156), SetPlayerFacingAngle(playerid,181.7349); } SetPlayerVirtualWorld(playerid, 1); SetPlayerInterior(playerid,10); } case 2: { new JailedSFPD = random(4)+1; switch(JailedSFPD) { case 1: SetPlayerPos(playerid,226.9169,109.1662,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 2: SetPlayerPos(playerid,222.7322,108.9943,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 3: SetPlayerPos(playerid,218.7821,109.3731,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 4: SetPlayerPos(playerid,214.7852,108.9267,999.0156), SetPlayerFacingAngle(playerid,181.7349); } SetPlayerVirtualWorld(playerid, 2); SetPlayerInterior(playerid,10); } case 3: { new JailedLVPD = random(4)+1; switch(JailedLVPD) { case 1: SetPlayerPos(playerid,226.9169,109.1662,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 2: SetPlayerPos(playerid,222.7322,108.9943,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 3: SetPlayerPos(playerid,218.7821,109.3731,999.0156), SetPlayerFacingAngle(playerid,181.7349); case 4: SetPlayerPos(playerid,214.7852,108.9267,999.0156), SetPlayerFacingAngle(playerid,181.7349); } SetPlayerVirtualWorld(playerid, 3); SetPlayerInterior(playerid,10); } case 4: { new JailedAlkatrazPD = random(13)+1; switch(JailedAlkatrazPD) { case 1: SetPlayerPos(playerid,1771.9841,-1544.9387,3537.2893), SetPlayerFacingAngle(playerid,0.3838); case 2: SetPlayerPos(playerid,1776.5739,-1544.8610,3537.2893), SetPlayerFacingAngle(playerid,358.3994); case 3: SetPlayerPos(playerid,1781.1573,-1544.8457,3537.2893), SetPlayerFacingAngle(playerid,1.6372); case 4: SetPlayerPos(playerid,1785.7015,-1544.6927,3537.2893), SetPlayerFacingAngle(playerid,2.5772); case 5: SetPlayerPos(playerid,1790.1583,-1544.7384,3537.2893), SetPlayerFacingAngle(playerid,359.8616); case 6: SetPlayerPos(playerid,1794.8053,-1544.7616,3537.2893), SetPlayerFacingAngle(playerid,1.0105); case 7: SetPlayerPos(playerid,1794.4745,-1566.8766,3537.2893), SetPlayerFacingAngle(playerid,180.9699); case 8: SetPlayerPos(playerid,1789.8889,-1566.8923,3537.2893), SetPlayerFacingAngle(playerid,180.9699); case 9: SetPlayerPos(playerid,1785.3682,-1567.1403,3537.2893), SetPlayerFacingAngle(playerid,180.2388); case 10: SetPlayerPos(playerid,1780.9644,-1567.0334,3537.2893), SetPlayerFacingAngle(playerid,180.1343); case 11: SetPlayerPos(playerid,1776.3522,-1566.9827,3537.2893), SetPlayerFacingAngle(playerid,182.3277); case 12: SetPlayerPos(playerid,1771.8562,-1567.0471,3537.2893), SetPlayerFacingAngle(playerid,182.9544); case 13: SetPlayerPos(playerid,1767.3292,-1567.0925,3537.2893), SetPlayerFacingAngle(playerid,182.0143); } SetPlayerVirtualWorld(playerid, 99); SetPlayerInterior(playerid, 99); } case 5://Åñëè ïîñàäèë àäìèí!!! { new admjailed = random(4)+1; switch(admjailed) { case 1: SetPlayerPos(playerid,1795.9672,-1573.6245,3526.4500),SetPlayerFacingAngle(playerid,272.6962); case 2: SetPlayerPos(playerid,1796.2128,-1576.9701,3526.4500),SetPlayerFacingAngle(playerid,271.2339); case 3: SetPlayerPos(playerid,1785.3579,-1577.9091,3526.4500),SetPlayerFacingAngle(playerid,90.1256); case 4: SetPlayerPos(playerid,1785.2468,-1574.4366,3526.4500),SetPlayerFacingAngle(playerid,87.5145); } SetPlayerVirtualWorld(playerid, 99); SetPlayerInterior(playerid, 99); } } TogglePlayerControllable(playerid,1); SetPlayerSkinNA(playerid,42); SetPlayerHealthEx(playerid, 60.0); pData[playerid][pHealth] = 60.0; PlayerPlaySound(playerid, 17004, 0.0, 0.0, 0.0); if(pData[playerid][pFraction]) SetPlayerColor(playerid,gFractionColor[pData[playerid][pFraction] - 1]); SendClientMessage(playerid, CYELLOW, "• [Ïîäñêàçêà]{"#cWHITE"} ×òîáû ïîñìîòðåòü ñêîëüêî Âàì îñòàëîñü ñèäåòü â òþðüìå, ââåäèòå êîìàíäó {FFFF00}/ptime"); } else if(pData[playerid][pHouse] && pData[playerid][pSpawn] <= 1) { SetPlayerVirtualWorld(playerid,pData[playerid][pHouse]); new interior, Float:r; new houseid = pData[playerid][pHouse] - 1; new hint = gHouses[houseid][houseHint]; if(pData[playerid][pFraction]) { if(gHouses[houseid][houseImprove][3] && gHouses[houseid][houseOwnerID] == pData[playerid][pMysqlID]) SetPlayerSkin(playerid,pData[playerid][pFractionSkin]); else SetPlayerSkin(playerid,pData[playerid][pFractionSkin]); } else SetPlayerSkin(playerid,pData[playerid][pSkin]); pTemp[playerid][pSelectedHouseID] = houseid; x = gHints[hint][hintSX]; y = gHints[hint][hintSY]; z = gHints[hint][hintSZ]; r = gHints[hint][hintSR]; interior = gHints[hint][hintInterior]; SetPlayerInterior(playerid,interior); SetPlayerPos(playerid,x,y,z); SetPlayerFacingAngle(playerid,r); pTemp[playerid][pIsInHouse] = true; if(pData[playerid][pFraction]) SetPlayerColor(playerid,gFractionColor[pData[playerid][pFraction] - 1]); } else if(pData[playerid][pFraction]) { new fractionid = pData[playerid][pFraction]-1; if(pData[playerid][pSubfraction]) { new frid; frid = GetSubfractionID(fractionid); new subid = pData[playerid][pSubfraction] - 1; SetPlayerInterior(playerid,gSubfractionSpawnData[frid][subid][0]); SetPlayerVirtualWorld(playerid,gSubfractionSpawnData[frid][subid][1]); SetPlayerPos(playerid,gSubfractionSpawnC[frid][subid][0],gSubfractionSpawnC[frid][subid][1],gSubfractionSpawnC[frid][subid][2]); SetPlayerFacingAngle(playerid,gSubfractionSpawnC[frid][subid][3]);
if(frid == 1 && subid == 0) {
} if(frid == 2 && subid >= 0) {
} } else { if(fractionid == 12) {
} SetPlayerVirtualWorld(playerid,gFractionSpawnData[fractionid][1]); SetPlayerInterior(playerid,gFractionSpawnData[fractionid][0]); SetPlayerPos(playerid,gFractionSpawnC[fractionid][0],gFractionSpawnC[fractionid][1],gFractionSpawnC[fractionid][2]); } SetPlayerSkin(playerid,pData[playerid][pFractionSkin]); SetCameraBehindPlayer(playerid); SetPlayerColor(playerid,gFractionColor[fractionid]); if((fractionid >= 0 && fractionid <= 7) || fractionid == 9) {
} } else { SetPlayerSkin(playerid,pData[playerid][pSkin]); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); if(pData[playerid][pLevel] < 5) { new spawnls = random(4);//ÑÏÀÂÍ ÌÅÍßÅÌ ÒÓÒ if(spawnls == 0) { SetPlayerPos(playerid,1762.3660,-1893.1317,13.5606); SetPlayerFacingAngle(playerid,270.7868); } if(spawnls == 1) { SetPlayerPos(playerid,1154.5562,-1768.4633,16.5938); SetPlayerFacingAngle(playerid,1.7675); } if(spawnls == 2) { SetPlayerPos(playerid,1765.0052,-1903.4672,13.5663); SetPlayerFacingAngle(playerid,270.7868); } if(spawnls == 3) { SetPlayerPos(playerid,1147.7163,-1768.9059,16.5992); SetPlayerFacingAngle(playerid,0.7231); } } if(pData[playerid][pLevel] > 6 && pData[playerid][pLevel] < 9) { SetPlayerPos(playerid,-1969.0582,159.8374,27.6875); SetPlayerFacingAngle(playerid,177.5901); } if(pData[playerid][pLevel] > 10) { SetPlayerPos(playerid,2846.0134,1291.2833,11.3906); SetPlayerFacingAngle(playerid,92.5072); } SetCameraBehindPlayer(playerid); SetPlayerColor(playerid,0xFFFFFF11); } if(pData[playerid][pMoney]) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid,pData[playerid][pMoney]); } SetPlayerScore(playerid,pData[playerid][pLevel]); new gun[128]; GetPVarString(playerid,"mysqlgun",gun,128); DeletePVar(playerid,"mysqlgun"); if(strlen(gun)) { new guns[6],ammos[6],datas[2][56]; explode(datas,gun,":"); printf("%s:%s",datas[0],datas[1]); sscanf(datas[0],"p<|>a<i>[6]",guns); sscanf(datas[1],"p<|>a<i>[6]",ammos); for(new i;i<6;i++) { GivePlayerWeaponEx(playerid,guns[i],ammos[i]); } } if(pTemp[playerid][pSpectating]) { x = GetPVarFloat(playerid,"oldx"); y = GetPVarFloat(playerid,"oldy"); z = GetPVarFloat(playerid,"oldz"); SetPlayerPos(playerid,x,y,z); SetPlayerInterior(playerid,GetPVarInt(playerid,"oldint")); SetPlayerVirtualWorld(playerid,GetPVarInt(playerid,"oldworld")); pTemp[playerid][pSpectating] = false; pTemp[playerid][pSpecOn] = 0; return 1; } if(pData[playerid][pWanted]) SetPlayerWantedLevel(playerid,pData[playerid][pWanted]); pTemp[playerid][pREGISKL] = false; if(pTemp[playerid][pDead] == true || pData[playerid][pHealth] < 50.0) { if(!pData[playerid][pJail]) { pTemp[playerid][pDead] = false; new Float:c[4][4] = { {-1049.7644,696.9392,1507.3469}, {-1058.8876,696.9025,1507.3469}, {-1055.6207,694.6600,1507.3469}, {-1049.2029,694.1185,1507.3469} }; new f = RandomEx(0,4); if(pData[playerid][pLevel] < 5) { SetPlayerInterior(playerid,1); SetPlayerVirtualWorld(playerid, 1); } else if(pData[playerid][pLevel] > 5 && pData[playerid][pLevel] < 9) { SetPlayerInterior(playerid,3); SetPlayerVirtualWorld(playerid, 2); } else if(pData[playerid][pLevel] > 10) { SetPlayerInterior(playerid,2); SetPlayerVirtualWorld(playerid, 3); } pTemp[playerid][pInHospital] = true; SetPlayerPos(playerid,c[f][0],c[f][1],c[f][2]); SetPlayerFacingAngle(playerid,c[f][3]); SetPlayerHealthEx(playerid,10.0); pData[playerid][pHealth] = 10.0; } } return 1; }
Сообщение отредактировал ForaN - Среда, 25.05.2016, 09:48 |
|
|
|
|