Jump to content

TheGodfather

Membru
  • Posts

    489
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by TheGodfather

  1. 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; }
  2. 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
  3. 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.
  4. 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; }
  5. 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; }
  6. Am reusit, multumesc mult pentru ajutor!
  7. Iti multumesc frumos! Voi incerca si revin cu reply.
  8. Salut, as vrea ca atunci cand un jucator e in masina si alt jucator trage in masina acestuia, sa ii apara un mesaj jucatorului din masina ca jucatorul cu numele x a tras in masina acestuia. Am incercat sa fac ca si mai jos dar imi da acelasi id, respectiv id-ul celui care da damage. public OnVehicleDamageStatusUpdate(vehicleid, playerid) { new string[128]; foreach(Player, i) if(IsPlayerInVehicle(i, vehicleid)) { format(string, sizeof(string), "%s did damage to vehicle with id %d drove by player %s", GetName(playerid), vehicleid, GetName(i)); SCMTA(-1, string); } return 1; }
  9. Zi de zi, ultima postare e pe 1 aprilie . Dar na, daca asta intelegi prin zi de zi e ok
  10. Salut, as vrea ca atunci cand un jucator e in masina si alt jucator trage in masina acestuia, sa ii apara un mesaj jucatorului din masina ca jucatorul cu numele x a tras in masina acestuia. Am incercat sa fac ca si mai jos dar imi da acelasi id, respectiv id-ul celui care da damage. public OnVehicleDamageStatusUpdate(vehicleid, playerid) { new string[128]; foreach(Player, i) if(IsPlayerInVehicle(i, vehicleid)) { format(string, sizeof(string), "%s did damage to vehicle with id %d drove by player %s", GetName(playerid), vehicleid, GetName(i)); SCMTA(-1, string); } return 1; }
  11. Vorbeste cu cei de unde ai vps-ul sa iti instaleze ei un server de samp iar dupa iti pui tu fisierele
  12. Nu ma pricep atat de bine la programare pentru asta dar mersi frumos de reply.
  13. Salut, exista o metoda prin care sa dau kick playerilor care au orice fel de mod?
  14. Salut, as vrea sa pun macaraua aceasta pe umarul din partea macaralei, si cu cupa in cealalta parte de cum e acum. SetPlayerAttachedObject(playerid, 6, 18248, 1, 0.388602, -0.084080, 0.854034, 0.000000, 83.616508, 0.000000, 0.057243, 0.039999, 0.066129);
  15. Salut, as vrea sa pun macaraua aceasta pe umarul din partea macaralei, si cu cupa in cealalta parte de cum e acum. SetPlayerAttachedObject(playerid, 6, 18248, 1, 0.388602, -0.084080, 0.854034, 0.000000, 83.616508, 0.000000, 0.057243, 0.039999, 0.066129);
  16. Ordinea datelor e ca la case 2, folosesc datele de la host si tot primesc acea eroare.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.