-
Posts
500 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
News
Documentation
Everything posted by TheGodfather
-
Inteleg, multumesc frumos pentru explicatie Edit: Oare ai putea sa imi dai un link de unde as putea sa iau ultima versiune? Multumesc
-
Salut, am vazut pe internet 2 moduri pentru a scrie un foreach si sunt curios ce diferente sunt (daca sunt) intre foreach(Player, i) si foreach(new i : Player) inafara de modul de scriere, desigur.
-
Nu iau spawn
-
Nu este niciun timer. E ceva problema la una din comenzile /sspec sau /sspecoff
-
Nu e neaparat sa fie 107, asta e valoarea pe care trebuie sa o puna pentru casa in care testez. De asta am pus 107 dar tot -1 pune
-
Am incercat si asa iar cand dau /test imi spune ca la InHouse e -1... SetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]); InHouse[playerid] = 107;//inaintehouse[playerid]; InHQ[playerid] = inaintehq[playerid]; InBussines[playerid] = inaintebusiness[playerid]; SCMf(playerid, -1, "house: %d l hq: %d l Biz: %d", InHouse[playerid], InHQ[playerid], InBussines[playerid]); return true;
-
YCMD:test(playerid, params[], help) { SCMf(playerid, -1, "pInt: %d l pLocal: %d l InHouse: %d l InHQ: %d l InBussines: %d", PlayerInfo[playerid][pInt], PlayerInfo[playerid][pLocal], InHouse[playerid], InHQ[playerid], InBussines[playerid]); return 1; }
-
Salut, cand dau /sspecoff la inhouse in loc sa imi puna valoarea 107 imi pune valoarea -1 chiar daca la ultimul mesaj de la /sspecoff la in house imi spune 107. Aveti idee de ce? YCMD:sspec(playerid, params[], help) { if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d %s.", aspam[playerid], aspam[playerid] > 1 ? "seconds" : "second"); if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly); virtualw = GetPlayerVirtualWorld(playerid); new id,string[180]; if(sscanf(params, "u", id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/spec <playerid/name>"); if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "That player is not connected."); if(id == playerid) return SCM(playerid, COLOR_GREY, "You can not use this command on you!"); if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "You can not use this command on that player."); if(IsPlayerLogged[id] == 0) return SCM(playerid, COLOR_LGREEN, "Error: That player is logging!"); Spectate[playerid] = id; SpecPlayers[playerid] ++; if(SpecPlayers[playerid] == 1) { GetPlayerPos(playerid, SpecPos[playerid][0], SpecPos[playerid][1], SpecPos[playerid][2]); IsPlayerSpec[playerid] = 1; pInteriorID[playerid] = GetPlayerInterior(playerid); pVirtual[playerid] = GetPlayerVirtualWorld(playerid); //inaintespec GetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]); inaintehouse[playerid] = InHouse[playerid]; inaintehq[playerid] = InHQ[playerid]; inaintebusiness[playerid] = InBussines[playerid]; //inaintespec } new Float:health; GetPlayerHealthEx(Spectate[playerid], health); new rank[50]; if(PlayerInfo[playerid][pAdmin] != 0) rank = "Admin"; else rank = "Helper"; if(GetPVarInt(id, "Reported") == 1 && GetPVarInt(id, "ReportType") != 4 && PlayerInfo[playerid][pAdmin] >= 1) { SetPVarInt(id, "Reported", 0); SetPVarInt(id, "ReportType", 0); SetPVarString(id, "ReportedBy", ""); SetPVarInt(id, "ReportScore", 0); SetPVarString(id, "ReportText", ""); } if(PlayerInfo[playerid][pAdmin] >= 1 && GetPVarInt(id, "ReportType") != 4) { PlayerInfo[playerid][pHelpedPlayers] += GetPVarInt(id, "ReportScore"); PlayerInfo[playerid][pHelpedPlayersToday] += GetPVarInt(id, "ReportScore"); } new szQuery[256]; mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE users SET `HelpedPlayers` = '%d', `HelpedPlayersToday`='%d' WHERE `ID` = '%d'", PlayerInfo[playerid][pHelpedPlayers], PlayerInfo[playerid][pHelpedPlayersToday], PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL, szQuery, "", ""); format(string, sizeof(string), "[SPEC] (%d) %s | Level: %d | Health: %.2f | AFK Time: %d | Seconds: %.0f | Duty: %d | Ping: %d",id,GetName(id),PlayerInfo[id][pLevel], health, AFKSeconds[id], PlayerInfo[id][pSeconds], OnDuty[id], GetPlayerPing(id)); SCM(playerid, 0xFFADADFF, string); new Player_Weapons[13], Player_Ammos[13], i, guns; string = "Weapons:"; for(i = 1;i <= 12;i++) { GetPlayerWeaponData(id,i,Player_Weapons[i],Player_Ammos[i]); if(Player_Weapons[i] != 0) { new weaponName[180]; GetWeaponName(Player_Weapons[i],weaponName,255); format(string,255, "%s %s (%d)", string, weaponName,Player_Ammos[i]); guns ++; } } if(guns > 0) SCM(playerid, -1, string); Iter_Add(MySpec[id], playerid); TogglePlayerSpectating(playerid, 1); SetPlayerInterior(playerid, GetPlayerInterior(id)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); if(IsPlayerInAnyVehicle(Spectate[playerid])) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Spectate[playerid])); else PlayerSpectatePlayer(playerid, Spectate[playerid]); PlayerTextDrawSetString(playerid, SpectatorTD, "Loading..."); PlayerTextDrawShow(playerid, SpectatorTD); return true; } YCMD:sspecoff(playerid, params[], help) { if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d %s.", aspam[playerid], aspam[playerid] > 1 ? "seconds" : "second"); if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly); if(Spectate[playerid] == 255) return SCM(playerid, COLOR_GREY, "You are not spectating a player."); TogglePlayerControllable(playerid, 1); TogglePlayerSpectating(playerid, 0); PlayerInfo[playerid][pInt] = pInteriorID[playerid]; PlayerInfo[playerid][pLocal] = pVirtual[playerid]; SetPlayerInterior(playerid, pInteriorID[playerid]); Unspec[playerid][sLocal] = 255; gTeam[playerid] = PlayerInfo[playerid][pTeam]; SetPlayerToTeamColor(playerid); SCM(playerid, -1, "You are no longer spectating!"); Iter_Remove(MySpec[Spectate[playerid]], playerid); Spectate[playerid] = 255; SpecPlayers[playerid] = 0; LastRecon[playerid] = 1; PlayerTextDrawHide(playerid, SpectatorTD); Iter_Clear(MySpec[playerid]); //inaintespec SetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]); InHouse[playerid] = inaintehouse[playerid]; InHQ[playerid] = inaintehq[playerid]; InBussines[playerid] = inaintebusiness[playerid]; SCMf(playerid, -1, "house: %d l hq: %d l Biz: %d", InHouse[playerid], InHQ[playerid], InBussines[playerid]); //inaintespec return true; }
-
Salut, am gasit acest bug pe gm b-hood editat de hpq123, aveti idee cum pot rezolva? Descriere:
-
Nu mai spune daca nu stii, random(10) merge de la 0 la 9. Nu ti-a iesit tentativa de baza pup
-
Ai 11 case-uri iar tu ai new castig = 1 + random(10); care poate avea valoarea maxima 10, deci case 11 nu o sa fie niciodata atins. Pune new castig = 1 + random(11); si revino cu reply. Edit: iar la toate mesajele SCM, cred ca ai vrut sa pui SCMf (cel mai probabil ai functia asta definita in gm) pentru ca folosesti %s. Sau daca nu poti face cu format. new string[144]; format(string, sizeof(string), "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext))); SCM(playerid, COLOR_RED, string);
-
Multumesc frumos
-
Salut, merita ca un gamemode sa aiba 2 limbi? Cam cat ar afecta performanta acea verificare de limba in fiecare loc unde exista un mesaj?
-
Salut, uneori nu imi arata toti membrii din factiune aici. YCMD:members(playerid, params[], help) return ShowFactionMembers(playerid); ShowFactionMembers(playerid) { if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(PlayerInfo[playerid][pMember] == 0) return 1; gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `users`.`Member` = '%d' ORDER BY `users`.`Rank` DESC LIMIT 50", PlayerInfo[playerid][pMember]); mysql_tquery(SQL, gQuery, "show_faction_members", "i", playerid); return 1; } function show_faction_members(playerid) { new MemberString[1024], TitleString[1024], name[MAX_PLAYER_NAME], lastl[32], rank, fw, tmembers, onmembers, days, member, commands; strcat(MemberString, "#. Name\tRank - FW\tDays - Raport Points\tStatus\n"); for(new i, j = cache_num_rows(); i != j; ++i) { cache_get_field_content(i, "name", name); cache_get_field_content(i, "lastOn", lastl); rank = cache_get_field_content_int(i, "Rank"); fw = cache_get_field_content_int(i, "FWarn"); days = cache_get_field_content_int(i, "Days"); member = cache_get_field_content_int(i, "Member"); commands = cache_get_field_content_int(i, "Commands0"); if(strlen(lastl) != 9) { format(Selected[playerid][tmembers], MAX_PLAYER_NAME, name); new userID = GetPlayerID(name); gString[0] = EOS; if(userID == INVALID_PLAYER_ID) onmembers++; if(rank == 7) format(gString, sizeof(gString), "%d. %s\t%d - %d/3\t%d - %d/10\t%s\n", tmembers+1, name, rank, fw, days, commands, userID != INVALID_PLAYER_ID ? "Online" : lastl); else format(gString, sizeof(gString), "%d. %s\t%d - %d/3\t%d - %d/%d\t%s\n", tmembers+1, name, rank, fw, days, commands, DynamicFactions[member][fCommands][rank - 1], userID != INVALID_PLAYER_ID ? "Online" : lastl); strcat(MemberString, gString, sizeof(MemberString)); tmembers++; } } format(TitleString, sizeof(TitleString), "Members"); ShowPlayerDialog(playerid, DIALOG_MEMBERS, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit"); return 1; }
-
Nu, nu am jucat pe sv ala niciodata si nici nu m-am uitat la clipuri cu el. Am avut pe sv o problema cand mergeam la wanted si cel care conducea nu lua damage si nu stiam de ce. Mai apoi am aflat ca avea desync si de asta vreau sa fac ceva sa verifice automat la cateva secunde
-
Salut, aveti idee cum pot sa fac o comanda prin care sa vad daca un player are desync sau nu? Nu ma refer la functia GetPlayerPing.
-
Am rezolvat
-
Am rezolvat
-
Salut, am aceste 2 functii, una pentru intrare si una pentru iesire. Poti intra in cele mentionate in titlu dar cand vreau sa ies nu mai face nimic. function EnterFunction(playerid) { new i = PickupInfo[PlayerPickup[playerid]][pkID]; switch(PickupInfo[PlayerPickup[playerid]][pkType]) { case 1: { if(!PlayerToPoint(1.5, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) return true; if(GetPlayerVirtualWorld(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "Error: You can not enter in a house because you are in another virtual world."); if(HouseInfo[i][hLock] != 0) return GameTextForPlayer(playerid, "~r~~h~Closed", 1000, 1); SetPlayerInterior(playerid,HouseInfo[i][hInterior]); PlayerInfo[playerid][pInt] = HouseInfo[i][hInterior]; PlayerInfo[playerid][pLocal] = i; SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtual]); InHouse[playerid] = i; DeelayCommand[playerid][13] = 5; HouseRadio(playerid, i); SetPlayerPosEx(true, playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); } case 2: { if(!PlayerToPoint(1.5, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || BizzInfo[i][bStatic] != 0) return true; if(PlayerMoney(playerid, BizzInfo[i][bFee])) return GameTextForPlayer(playerid, "~r~~h~You do not have enough money", 1000, 1); if(BizzInfo[i][bLocked] == 1) return GameTextForPlayer(playerid, "~r~~h~Closed", 1000, 1); switch(BizzInfo[i][bType]) { case 1: SCM(playerid,COLOR_WHITE,"Commands: /withdraw, /transfer, /deposit."); case 3: SCM(playerid,COLOR_WHITE,"Commands: /drink."); case 5: SCM(playerid,COLOR_WHITE,"Commands: /buydildo."); case 6: SCM(playerid,COLOR_WHITE,"Commands: /buy."); case 7: SCM(playerid,COLOR_WHITE,"Commands: /glasses, /buyhat."); case 8: { if(KG[playerid] != 0) { GiveJobSalary(playerid); DisablePlayerCheckpointEx(playerid); CP[playerid] = 0; GunoiKG[playerid] = 0; KG[playerid] = 0; PlayerInfo[playerid][pFarmerSkill] ++; Update(playerid, pFarmerSkillx); DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0, JobWorking[playerid] = 0; } } case 9: SCM(playerid,COLOR_WHITE,"Commands: /dice."); case 20: SCM(playerid,COLOR_WHITE,"Commands: /buy."); } GivePlayerCash(playerid, 0,BizzInfo[i][bFee]); BizzInfo[i][bBalance] += BizzInfo[i][bFee]; BizzRadio(playerid, i); SetPlayerInterior(playerid,BizzInfo[i][bInterior]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirtual]); InBussines[playerid] = i; SetPlayerPosEx(true, playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ] + 0.2); gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[i][bBalance], BizzInfo[i][bID]); mysql_tquery(SQL, gQuery, "", ""); } case 3: { if(!PlayerToPoint(1.5, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ])) return true; if(PlayerInfo[playerid][pMember] == i || i < 3 || DynamicFactions[i][fLock] == 1 || OnDuty[playerid] == 1 /*adaugat nou->*/|| OnDuty[playerid] == 0) { SetPlayerInterior(playerid, DynamicFactions[i][fInterior]); SetPlayerVirtualWorld(playerid, DynamicFactions[i][fID]); InHQ[playerid] = i; SetPlayerPosEx(true, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ]); } } case 4: { if(!PlayerToPoint(1.5, playerid, ClanHQInfo[i][cPosX], ClanHQInfo[i][cPosY], ClanHQInfo[i][cPosZ])) return true; if(GetPlayerVirtualWorld(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "You can not enter in a house because you are in another virtual world."); if(ClanHQInfo[i][cClan] != PlayerInfo[playerid][pClan] && ClanHQInfo[i][cClan] != 0) return SCMf(playerid, COLOR_GREY, "You are not in the clan with id %d.", ClanHQInfo[i][cClan]); else if(ClanHQInfo[i][cClan] == 0) return 1; SetPlayerInterior(playerid, 1); InClanHQ[playerid] = i; SetPlayerVirtualWorld(playerid, ClanHQInfo[i][cVirtualWorld]); SetPlayerPosEx(false, playerid, ClanHQInfo[i][cEnterX], ClanHQInfo[i][cEnterY], ClanHQInfo[i][cEnterZ]); SCM(playerid, COLOR_WHITE, "Welcome to clan HQ."); } } return true; } //test function ExitFunction(playerid) { new i; if(InHouse[playerid] != -1) { i = InHouse[playerid]; if(PlayerInfo[playerid][pSleeping] == 1) return true; if(!PlayerToPoint(1.5, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz])) return true; SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); PlayRadio[playerid] = 0; SetPlayerPosEx(false, playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]); StopAudioStreamForPlayer(playerid); InHouse[playerid] = -1; return true; } if(InBussines[playerid] != -1) { i = InBussines[playerid]; if(!PlayerToPoint(1.5, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ])) return true; SetPlayerInterior(playerid, 0); PlayerInfo[playerid][pLocal] = 255; PlayRadio[playerid] = 0; StopAudioStreamForPlayer(playerid); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pTutorial] < 10 ? playerid + 10 : 0); SetPlayerPosEx(false, playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]); InBussines[playerid] = -1; return true; } if(InHQ[playerid] != -1) { i = InHQ[playerid]; if(!PlayerToPoint(1.5, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ])) return true; SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(false, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ]); InHQ[playerid] = -1; return true; } if(InClanHQ[playerid] != -1) { new idd = ClanInfo[PlayerInfo[playerid][pClan]][clHQ]; if(!PlayerToPoint(1.5, playerid, ClanHQInfo[idd][cEnterX], ClanHQInfo[idd][cEnterY], ClanHQInfo[idd][cEnterZ])) return true; SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(false, playerid, ClanHQInfo[idd][cPosX], ClanHQInfo[idd][cPosY], ClanHQInfo[idd][cPosZ]); InClanHQ[playerid] = -1; } return true; }
-
Salut, am aceste 2 functii, una pentru intrare si una pentru iesire. Poti intra in cele mentionate in titlu dar cand vreau sa ies nu mai face nimic. function EnterFunction(playerid) { new i = PickupInfo[PlayerPickup[playerid]][pkID]; switch(PickupInfo[PlayerPickup[playerid]][pkType]) { case 1: { if(!PlayerToPoint(1.5, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) return true; if(GetPlayerVirtualWorld(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "Error: You can not enter in a house because you are in another virtual world."); if(HouseInfo[i][hLock] != 0) return GameTextForPlayer(playerid, "~r~~h~Closed", 1000, 1); SetPlayerInterior(playerid,HouseInfo[i][hInterior]); PlayerInfo[playerid][pInt] = HouseInfo[i][hInterior]; PlayerInfo[playerid][pLocal] = i; SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtual]); InHouse[playerid] = i; DeelayCommand[playerid][13] = 5; HouseRadio(playerid, i); SetPlayerPosEx(true, playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); } case 2: { if(!PlayerToPoint(1.5, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || BizzInfo[i][bStatic] != 0) return true; if(PlayerMoney(playerid, BizzInfo[i][bFee])) return GameTextForPlayer(playerid, "~r~~h~You do not have enough money", 1000, 1); if(BizzInfo[i][bLocked] == 1) return GameTextForPlayer(playerid, "~r~~h~Closed", 1000, 1); switch(BizzInfo[i][bType]) { case 1: SCM(playerid,COLOR_WHITE,"Commands: /withdraw, /transfer, /deposit."); case 3: SCM(playerid,COLOR_WHITE,"Commands: /drink."); case 5: SCM(playerid,COLOR_WHITE,"Commands: /buydildo."); case 6: SCM(playerid,COLOR_WHITE,"Commands: /buy."); case 7: SCM(playerid,COLOR_WHITE,"Commands: /glasses, /buyhat."); case 8: { if(KG[playerid] != 0) { GiveJobSalary(playerid); DisablePlayerCheckpointEx(playerid); CP[playerid] = 0; GunoiKG[playerid] = 0; KG[playerid] = 0; PlayerInfo[playerid][pFarmerSkill] ++; Update(playerid, pFarmerSkillx); DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0, JobWorking[playerid] = 0; } } case 9: SCM(playerid,COLOR_WHITE,"Commands: /dice."); case 20: SCM(playerid,COLOR_WHITE,"Commands: /buy."); } GivePlayerCash(playerid, 0,BizzInfo[i][bFee]); BizzInfo[i][bBalance] += BizzInfo[i][bFee]; BizzRadio(playerid, i); SetPlayerInterior(playerid,BizzInfo[i][bInterior]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirtual]); InBussines[playerid] = i; SetPlayerPosEx(true, playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ] + 0.2); gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[i][bBalance], BizzInfo[i][bID]); mysql_tquery(SQL, gQuery, "", ""); } case 3: { if(!PlayerToPoint(1.5, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ])) return true; if(PlayerInfo[playerid][pMember] == i || i < 3 || DynamicFactions[i][fLock] == 1 || OnDuty[playerid] == 1 /*adaugat nou->*/|| OnDuty[playerid] == 0) { SetPlayerInterior(playerid, DynamicFactions[i][fInterior]); SetPlayerVirtualWorld(playerid, DynamicFactions[i][fID]); InHQ[playerid] = i; SetPlayerPosEx(true, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ]); } } case 4: { if(!PlayerToPoint(1.5, playerid, ClanHQInfo[i][cPosX], ClanHQInfo[i][cPosY], ClanHQInfo[i][cPosZ])) return true; if(GetPlayerVirtualWorld(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "You can not enter in a house because you are in another virtual world."); if(ClanHQInfo[i][cClan] != PlayerInfo[playerid][pClan] && ClanHQInfo[i][cClan] != 0) return SCMf(playerid, COLOR_GREY, "You are not in the clan with id %d.", ClanHQInfo[i][cClan]); else if(ClanHQInfo[i][cClan] == 0) return 1; SetPlayerInterior(playerid, 1); InClanHQ[playerid] = i; SetPlayerVirtualWorld(playerid, ClanHQInfo[i][cVirtualWorld]); SetPlayerPosEx(false, playerid, ClanHQInfo[i][cEnterX], ClanHQInfo[i][cEnterY], ClanHQInfo[i][cEnterZ]); SCM(playerid, COLOR_WHITE, "Welcome to clan HQ."); } } return true; } //test function ExitFunction(playerid) { new i; if(InHouse[playerid] != -1) { i = InHouse[playerid]; if(PlayerInfo[playerid][pSleeping] == 1) return true; if(!PlayerToPoint(1.5, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz])) return true; SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); PlayRadio[playerid] = 0; SetPlayerPosEx(false, playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]); StopAudioStreamForPlayer(playerid); InHouse[playerid] = -1; return true; } if(InBussines[playerid] != -1) { i = InBussines[playerid]; if(!PlayerToPoint(1.5, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ])) return true; SetPlayerInterior(playerid, 0); PlayerInfo[playerid][pLocal] = 255; PlayRadio[playerid] = 0; StopAudioStreamForPlayer(playerid); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pTutorial] < 10 ? playerid + 10 : 0); SetPlayerPosEx(false, playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]); InBussines[playerid] = -1; return true; } if(InHQ[playerid] != -1) { i = InHQ[playerid]; if(!PlayerToPoint(1.5, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ])) return true; SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(false, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ]); InHQ[playerid] = -1; return true; } if(InClanHQ[playerid] != -1) { new idd = ClanInfo[PlayerInfo[playerid][pClan]][clHQ]; if(!PlayerToPoint(1.5, playerid, ClanHQInfo[idd][cEnterX], ClanHQInfo[idd][cEnterY], ClanHQInfo[idd][cEnterZ])) return true; SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(false, playerid, ClanHQInfo[idd][cPosX], ClanHQInfo[idd][cPosY], ClanHQInfo[idd][cPosZ]); InClanHQ[playerid] = -1; } return true; }
-
Nu
