-
Posts
500 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
News
Documentation
Everything posted by TheGodfather
-
Am rezolvat
-
Salut, am un sistem de radar dar nu merge, nu prinde niciun jucator. function OtherTimer() { new stringg[180], iswar; //radar foreach(new i : Player) { if(RadarCooldown[i] > 0) RadarCooldown[i] --; } //radar stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); } Asta de jos e la functia function Checkvehinfo(i) new spe = Carspeed(i); foreach(new x : Player) { if(Radar[x] > 0) { new Float:rPos[3]; GetPlayerPos(x, rPos[0],rPos[1],rPos[2]); GetXYInFrontOfPlayer(x, rPos[0],rPos[1], 100.0); if(IsPlayerInRangeOfPoint(i, 60, rPos[0],rPos[1],rPos[2])) { if(spe > Radar[x] && PlayerInfo[i][pWantedLevel] == 0 && !IsACop(i)) { UsedFind[x] = 1; CP[x] = 53; new Float:X,Float:Y,Float:Z; GetPlayerPos(i, X,Y,Z); SetPlayerCheckpointEx(x, X,Y,Z, 3.5); targetfind[x] = i; SCMf(x,COLOR_YELLOW,"{ff0000}%s{ffffff} was caught speeding with %d km/h where the limit is {ff0000}%d km/h.",GetName(i),spe,Radar[x]); SCMf(i,COLOR_YELLOW,"You have been caught speeding with a speed of {ff0000}%d km/h{ffffff} where the limit is {ff0000}%d km/h.",spe,Radar[x]); SetPlayerWantedLevel(i, 2); PlayerInfo[i][pWantedLevel] += 2; //SetPlayerCriminal(i,x, "speeding",2); //culoarewanted SetPlayerColor(i, 0xFF0033FF); //culoarewanted SetPlayerCriminal(i, 255 ,"speeding"); WantedTime[i] = 0; Update(i,pWantedLevelx); TogglePlayerControllable(x, 1); Radar[x] = 0; } } } } //radar YCMD:radar(playerid,params[],help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(RadarCooldown[playerid] > 0) return SCMf(playerid,COLOR_GREY,"Wait %d seconds to place a radar.",RadarCooldown[playerid]); if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 14) { if(OnDuty[playerid] == 1) { new vehicle = GetVehicleID(GetPlayerVehicleID(playerid)); if(ServerVehicles[vehicle][vFaction] == 1 || ServerVehicles[vehicle][vFaction] == 14) { new maxspeed; if(sscanf(params, "i", maxspeed)) return SCM(playerid,-1,"{FF6699}Usage: {ffffff}/radar <max speed>"); if(maxspeed < 100 || maxspeed > 270) return SCM(playerid, COLOR_GREY, "Minimum speed is 100 km/h and maximum speed is 270 km/h."); Radar[playerid] = maxspeed; SCMf(playerid,COLOR_YELLOW,"You have placed a radar for %d km/h.",maxspeed); TogglePlayerControllable(playerid, 0); gString[0] = EOS; format(gString, sizeof(gString), "%s placed a radar (%d km/h) in %s.",GetName(playerid),maxspeed,GetPlayerZone(playerid)); SendFactionMessage(1,COLOR_CLIENT,gString); SendFactionMessage(2,COLOR_CLIENT,gString); SendFactionMessage(3,COLOR_CLIENT,gString); SendFactionMessage(14,COLOR_CLIENT,gString); RadarCooldown[playerid] = 45; } else return SCM(playerid,-1,"You are not in a faction vehicle!"); } else return SCM(playerid,-1,"You are not on duty!"); } else return SCM(playerid,-1,"Only LSPD and LVPD members can use this command!"); return 1; }
-
Am rezolvat, puteti inchide topic-ul.
-
Nu. Dar am rezolvat, puteti inchide topic-ul.
-
Salut, as vrea ca dupa restart sa imi puna valoarea pe care a avut-o job goal-ul inainte de restart. Job goal-ul se salveaza bine in baza de date de fiecare data cand un player face job. Doar ca atunci cand pornesc server-ul din nou o sa aiba valoarea 0. function UpdateJobGoal(update) { ServerGoal += update; gString[0] = EOS; format(gString, 60, "~y~$%s ~w~/ ~r~$%s", ServerGoal >= MAXGOAL ? FormatNumbers(MAXGOAL) : FormatNumbers(ServerGoal), FormatNumbers(MAXGOAL)); TextDrawSetString(GoalTD[0], gString); if(TerminatJobGoal != 1) { //goal gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `stuff` SET `goal`='%d'", ServerGoal); mysql_tquery(SQL, gQuery, "", ""); //goal if(ServerGoal >= MAXGOAL) { foreach(Player, b) { new amount, rand = random(30); switch(rand) { case 0..10: { amount = RandomEx(50, 100); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Gift Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pGiftPoints] += amount; if(PlayerInfo[b][pGiftPoints] >= 500) PlayerInfo[b][pGiftPoints] = 500; Update(b, pGiftPointsx); } case 11..19: { amount = RandomEx(15, 30); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Premium Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pPremiumPoints] += amount; Update(b, pPremiumPointsx); } default: { amount = RandomEx(200, 300); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Q-Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pHpoints] += amount; Update(b, pHpointsx); } } } TerminatJobGoal = 1; } } return true; } GoalTD[0] este definit astfel in Booter.inc GoalTD[0] = TextDrawCreate(320.281829, 435.829803, "~y~$0~w~ /~g~ $50.000.000"); Goal-ul se salveaza aici: stuff - goal
-
Da, acolo sunt stocate. Da, ajung in vw 0 pentru ca ma duceam in vw 0 si vedeam majoritatea masinilor de la factiune acolo, cand ele trebuiau sa fie in vw 3. Doar 4-5 masini din vreo 14 erau in vw 3, restul 0. YCMD:attack(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(!IsAMember(playerid)) return SCM(playerid,COLOR_GREY, "You are not part of a mafia."); if(PlayerInfo[playerid][pRank] < 7) return SCM(playerid,COLOR_LIGHTBLUE,"You do not have rank 7."); new turf,string[100]; for(new i = 0; i < sizeof(TurfInfo); i++) { if(IsPlayerInTurf(playerid, i) == 1) { turf = i; break; } } new hour,minutes,second, year, month, day; gettime(hour,minutes,second); getdate(year, month, day); new days[180]; format(days, sizeof(days), GetWeekDay(day, month, year)); if(PlayerInfo[playerid][pAdmin] < { if(GetFactionMembersOn2(PlayerInfo[playerid][pMember]) < 2) return SCM(playerid, COLOR_LGREEN, "You can not use this command because there are less than 3 members connected from your faction!"); if(GetFactionMembersOn2(TurfInfo[turf][zOwned]) < 2) return SCM(playerid, COLOR_LGREEN, "You can not use this command because there are less than 3 members connected from the faction owning the territory!"); } if(turf == 0) return SCM(playerid, COLOR_WHITE, "You are not on a territory!"); new faction = PlayerInfo[playerid][pMember]; if(TurfInfo[turf][zOwned] == faction) return SCM(playerid, COLOR_GREY, "You can not attack the turf of your mafia."); if(WarInfo[turf][wAttacker] != 0) return SCM(playerid, COLOR_WHITE, "That turf is already attacked."); if(InWar[faction] == 1) return SCM(playerid, COLOR_WHITE, "There is an active war."); if(InWar[TurfInfo[turf][zOwned]] == 1) return SCM(playerid, COLOR_WHITE, "This mafia already has an active war."); if(FactionDeelay[PlayerInfo[playerid][pMember]] != 0 && PlayerInfo[playerid][pAdmin] < { format(string, sizeof(string), "You can use this command after %d minutes (%d seconds).", FactionDeelay[PlayerInfo[playerid][pMember]]/60, FactionDeelay[PlayerInfo[playerid][pMember]]); SCM(playerid, COLOR_LGREEN, string); return true; } format(string, sizeof(string), "[WAR] %s started a war with %s.",FactionName(PlayerInfo[playerid][pMember]), FactionName(TurfInfo[turf][zOwned])); SendAdminMessage(COLOR_LOGS, string, 1); format(string, sizeof(string), "[WAR] %s attacked territory %d owned by faction %s.",GetName(playerid),turf+1,FactionName(TurfInfo[turf][zOwned])); SendFactionMessage(faction,COLOR_MONEY,string); format(string, sizeof(string), "[WAR] %s (%s) attacked territory %d owned by faction %s.",FactionName(WarInfo[turf][wAttacker]),GetName(playerid),turf, FactionName(TurfInfo[turf][zOwned])); SendFactionMessage(TurfInfo[turf][zOwned],COLOR_MONEY,string); new query[128]; mysql_format(SQL, query,sizeof(query),"UPDATE `turfs` SET `Time`='24' WHERE `ID`='%d'",turf); mysql_tquery(SQL,query, "", ""); TurfInfo[turf][zTime] = 24; if(PlayerInfo[playerid][pAdmin] == WarInfo[turf][wTime] = 30; else WarInfo[turf][wTime] = 1200; WarInfo[turf][wAttacker] = faction; WarInfo[turf][wFaction] = TurfInfo[turf][zOwned]; worstscoreat[turf] = 0; worstmemberat[turf] = 999; bestscoreat[turf] = 0; bestmemberat[turf] = 999; worstscoredf[turf] = 0; worstmemberdf[turf] = 999; bestscoredf[turf] = 0; bestmemberdf[turf] = 999; InWar[TurfInfo[turf][zOwned]] = 1; InWar[faction] = 1; InWarTurf[faction] = turf; InWarTurf[TurfInfo[turf][zOwned]] = turf; foreach(Player, i) { if(IsPlayerLogged[i] == 1) { if(PlayerInfo[i][pMember] == faction || PlayerInfo[i][pMember] == TurfInfo[turf][zOwned]) UpdateVar(i, "WarTurf", turf); } } SetVehicle(faction, turf+1); SetVehicle(TurfInfo[turf][zOwned], turf+1); return true; }
-
Am reusit sa rezolv partea cu /turfs. Dar acum masinile nu se spawneaza corect masinile in virtual world, de exemplu daca trebuie sa le puna in vw 3, unele le duce dar unele le lasa in vw 0. function SetVehicle(fid, turf) { for(new i = 1; i < MAX_SVEHICLES; i++) { if(ServerVehicles[i][vFaction] == fid) SetVehicleVirtualWorld(i, turf); } return true; }
-
Sunt 34 de turfuri in total. enum zInfo { zID, zName[64], zOwned, zTime, Float:zMinX, Float:zMinY, Float:zMaxX, Float:zMaxY }; new TurfInfo[36][zInfo], Turfs[36];
-
Salut, la gamemode-ul bhood hpq123 am observat ca dupa ce dau restart, turfurile se pun aiurea in /turfs. Cu siguranta mai sunt si alte probleme la sistemul de war. Aveti idee cum pot rezolva? Las mai jos ce tine de sistemul de war. YCMD:turfs(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(TurfsDisp[playerid] == 0) { TurfsDisp[playerid] = 1; for(new i = 0; i < sizeof(Turfs); i++) { switch(TurfInfo[i][zOwned]) { case 0: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xFFFFFFAA); //None case 4: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x0CAB3C99); //Grove Street case 5: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x11F2F299); //Los Vagos case 6: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x8E541099); //Ballas case 10: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xAB00FA99); //Los Aztecas } } SCM(playerid, -1, "You activated the turfs."); } else { TurfsDisp[playerid] = 0; for(new i = 0; i < sizeof(Turfs); i++) GangZoneHideForPlayerEx(playerid, Turfs[i]); SCM(playerid, -1, "You deactivated the turfs."); } return true; } function SQL_loadTurfs() { printf("Turfs: %d", cache_num_rows()); if(cache_num_rows() == 0) return true; new ORM:ormid; for(new i = 0; i < cache_num_rows(); i++) { ormid = orm_create("turfs"); orm_addvar_int(ormid, TurfInfo[i][zID], "ID"); orm_addvar_int(ormid, TurfInfo[i][zOwned], "Owned"); orm_addvar_float(ormid, TurfInfo[i][zMinX], "MinX"); orm_addvar_float(ormid, TurfInfo[i][zMinY], "MinY"); orm_addvar_float(ormid, TurfInfo[i][zMaxX], "MaxX"); orm_addvar_float(ormid, TurfInfo[i][zMaxY], "MaxY"); orm_apply_cache(ormid, i); } for(new i = 0; i < sizeof(TurfInfo); i++) Turfs[i] = GangZoneCreateEx(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY],TurfInfo[i][zID],1.0); return true; } Functia SQL_loadTurfs este folosita la OnGamemodeInit astfel: mysql_tquery(SQL, "SELECT * FROM `turfs`", "SQL_loadTurfs", ""); function OtherTimer() { new stringg[180], iswar; for(new w = 0; w < 16; w++) if(InWar[w] == 1) iswar = 1; if(iswar != 1) return true; for(new i = 0; i < sizeof(Turfs); i++) { new attackers = WarInfo[i][wAttacker]; new defenders = WarInfo[i][wFaction]; if(WarInfo[i][wTime] >= 2) { foreach(Player,j) { if(PlayerInfo[j][pMember] == attackers || PlayerInfo[j][pMember] == defenders) { if(WarInfo[i][wAttacker] == 4) GangZoneFlashForPlayer(j,Turfs[i], 0x0CAB3C99); else if(WarInfo[i][wAttacker] == 5) GangZoneFlashForPlayer(j,Turfs[i], 0x11F2F299); else if(WarInfo[i][wAttacker] == 6) GangZoneFlashForPlayer(j,Turfs[i], 0x8E541099); else if(WarInfo[i][wAttacker] == 10) GangZoneFlashForPlayer(j,Turfs[i], 0xAB00FA99); } } } if(WarInfo[i][wTime] > 0) { WarInfo[i][wTime] -= 1; foreach(Player,j) { if(IsPlayerInTurf(j,i) == 1) { if(PlayerInfo[j][pMember] == attackers) WarScoreF[attackers][i] += 0.002; if(PlayerInfo[j][pMember] == defenders) WarScoreF[defenders][i] += 0.002; } } if(WarInfo[i][wTime] == 1) { new Float: atscore = 0.0; new Float: defscore = 0.0; atscore = WarScoreF[attackers][i]; defscore = WarScoreF[defenders][i]; new winner; SetVehicle(attackers, 0); SetVehicle(defenders, 0); foreach(Player,j) { if(PlayerInfo[j][pMember] == attackers) { SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------"); RespawnVehicle(attackers); GangZoneStopFlashForPlayer(j,Turfs[i]); format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i+1); SCM(j, COLOR_MONEY,stringg); //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200); PlayerTextDrawHide(j, WarTime); } if(PlayerInfo[j][pMember] == defenders) { SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------"); RespawnVehicle(defenders); GangZoneStopFlashForPlayer(j,Turfs[i]); format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i); SCM(j, COLOR_MONEY,stringg); //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200); PlayerTextDrawHide(j, WarTime); } } DestroyPickups(i); if(atscore > defscore) winner = 1; else winner = 2; new winbest, losebest; new winbestj = -1, losebestj = -1; new bestname1[25],bestname2[25],bestname[25],worstname[25]; FactionDeelay[attackers] = 300; foreach(Player,j) { if(winner == 1) { if(PlayerInfo[j][pMember] == attackers) { winbest = bestscoreat[i]; if(bestmemberat[i] != 999) { if(PlayerInfo[bestmemberat[i]][pMember] == attackers) { winbestj = bestmemberat[i]; GetPlayerName(winbestj,bestname1,sizeof(bestname1)); strmid(bestname, bestname1, 0, strlen(bestname1), 255); } } else { format(bestname,sizeof(bestname),"Null"); strmid(bestname, bestname, 0, strlen(bestname), 255); } } if(PlayerInfo[j][pMember] == defenders) { losebest = worstscoredf[i]; if(worstmemberdf[i] != 999) { if(PlayerInfo[worstmemberdf[i]][pMember] == defenders) { losebestj = worstmemberdf[i]; GetPlayerName(losebestj,bestname2,sizeof(bestname2)); strmid(worstname, bestname2, 0, strlen(bestname2), 255); } } else { format(worstname,sizeof(worstname),"Null"); strmid(worstname, worstname, 0, strlen(worstname), 255); } } } if(winner == 2) { if(PlayerInfo[j][pMember] == defenders) { winbest = bestscoredf[i]; if(bestmemberdf[i] != 999) { if(PlayerInfo[bestmemberdf[i]][pMember] == defenders) { winbestj = bestmemberdf[i]; GetPlayerName(winbestj,bestname1,sizeof(bestname1)); strmid(bestname, bestname1, 0, strlen(bestname1), 255); } } else { format(bestname,sizeof(bestname),"Null"); strmid(bestname, bestname, 0, strlen(bestname), 255); } } if(PlayerInfo[j][pMember] == attackers) { losebest = worstscoreat[i]; if(worstmemberat[i] != 999) { if(PlayerInfo[worstmemberat[i]][pMember] == attackers) { losebestj = worstmemberat[i]; GetPlayerName(losebestj,bestname2,sizeof(bestname2)); strmid(worstname, bestname2, 0, strlen(bestname2), 255); } } else { format(worstname,sizeof(worstname),"Null"); strmid(worstname, worstname, 0, strlen(worstname), 255); } } } } foreach(Player,j) { new uciderii = 0; uciderii += ucideri[j][i]; new decesee = 0; decesee += decese[j][i]; ucideri[j][i] = 0; decese[j][i] = 0; if((PlayerInfo[j][pMember] == attackers) || (PlayerInfo[j][pMember] == defenders)) { SetPlayerVirtualWorld(j, 0); if(WarSeconds[j] >= 300) { //UpdateFactionRaport(j, 0); //edisonraport AddRaportPoint(j); //edisonraport } WarSeconds[j] = 0; if(winner == 1) { format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wAttacker]),atscore,FactionName(WarInfo[i][wFaction]),defscore); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee, uciderii, decesee); SCM(j, COLOR_MONEY,stringg); TurfInfo[i][zOwned] = WarInfo[i][wAttacker]; Wartimeon[j] = 0; } if(winner == 2) { format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wFaction]),defscore,FactionName(WarInfo[i][wAttacker]),atscore); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee,uciderii, decesee); SCM(j, COLOR_MONEY,stringg); Wartimeon[j] = 0; } SCM(j, COLOR_MONEY, "---------------------------------------------------------------"); WarScoreF[defenders][i] = 0.0; WarScoreF[attackers][i] = 0.0; InWar[attackers] = 0; InWar[defenders] = 0; } if(winner == 1) { GangZoneHideForPlayerEx(j,Turfs[i]); if(attackers == 4) GangZoneShowForPlayerEx(j,Turfs[i],0x0CAB3C99); if(attackers == 5) GangZoneShowForPlayerEx(j,Turfs[i],0x11F2F299); if(attackers == 6) GangZoneShowForPlayerEx(j,Turfs[i],0x8E541099); if(attackers == 10) GangZoneShowForPlayerEx(j,Turfs[i],0xAB00FA99); } } if(winner == 1) { new str[128]; mysql_format(SQL, str,128,"UPDATE `turfs` SET `Owned`='%d' WHERE `ID`='%d'",TurfInfo[i][zOwned],i); mysql_tquery(SQL,str, "", ""); } WarInfo[i][wTime] = 0; WarInfo[i][wFaction] = 0; WarInfo[i][wAttacker] = 0; worstscoreat[i] = 0; worstmemberat[i] = 999; bestscoreat[i] = 0; bestmemberat[i] = 999; worstscoredf[i] = 0; worstmemberdf[i] = 999; bestscoredf[i] = 0; bestmemberdf[i] = 999; mysql_tquery(SQL, "UPDATE `users` SET `WarTurf`='0', `WarKills`='0', `WarDeaths`='0'", "", ""); } } } return true; }
-
Aceasta era problema, multumesc frumos pentru ajutor!
-
Salut, masinile se respawneaza la un interval de timp daca cineva nu e in ele. Am pus peste tot unde e SetVehicleToRespawn() un mesaj unic, ca sa imi dau seama unde e problema. Dar cand masina se respawneaza nu apare niciun mesaj, tin sa mentionez ca mesajul e pus cu SendClientMessageToAll. Deci nu exista sansa sa se fi trimis si sa nu il fi vazut. Am gamemode hpq123 bhood.
-
Am incercat si asta si nu a mers. Am rescris functia IsVehicleOccupied in alt mod si acum merge. Multumesc tuturor pentru reply-uri.
-
Am pus cum ai zis si tot la fel face.
-
Multumesc, voi incerca cand ajung acasa
-
Am incercat si tot asa imi spune. Dupa ce dau /park, ma scoate din masina si cand dau /v imi spune ca e "occupied".
-
Salut, cand dau /park, parcheaza masina corect dar daca ma uit in /v imi spune ca este "occupied" chiar daca eu nu mai sunt in ea. Ma scoate cand dau /park. YCMD:park(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new car = GetPlayerVehicleID(playerid); if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in your vehicle."); if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You do not have a personal vehicle!"); if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in one of your vehicles!"); if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_GREEN, "* You need to drive the car in order to use this command!"); new idd = PersonalCar(playerid); new Float: vhp; GetVehicleHealth(car, vhp); if(vhp < 800) return SCM(playerid, COLOR_GREY, "You can not park the car because it has less than 800 'health'!"); if(PlayerToPoint(150, playerid, 564.1226, -1270.0704, 17.2477)) return SCM(playerid, COLOR_ERROR, "INFO: {FFFFFF}You can not park the car near the spawn."); new Float:x, Float:y, Float:z, Float:a; saveTuning(playerid, CarInfo[idd][Spawned]); GetVehiclePos(car, x, y, z); GetVehicleZAngle(car, a); CarInfo[idd][cLocationx] = x; CarInfo[idd][cLocationy] = y; CarInfo[idd][cLocationz] = z; CarInfo[idd][cTime] = gettime()+600; CarInfo[idd][cAngle] = a; CarInfo[idd][cVirtual] = GetPlayerVirtualWorld(playerid); DestroyVehicle(car); if(strlen(CarInfo[idd][cText]) >= 3) { DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]); } CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo], -1, 0); SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]); attach_vip_text(idd); SetVehicleHealth(CarInfo[idd][Spawned], CarInfo[idd][cVip] ? 2000 : 1000); SetTunning(idd); SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]); saveCar(idd); new Float: Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); CarInfo[idd][cLastPos][0] = Pos[0]; CarInfo[idd][cLastPos][1] = Pos[1]; CarInfo[idd][cLastPos][2] = Pos[2]; return true; } function IsVehicleOccupied(vehicleid) return VehicleOccupied[vehicleid] != 0 ? (true) : (false); stock ShowPlayerVehicle(playerid, bool: type) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new szTitle[2000], szDialog[2000], x = 0; if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_LGREEN, "Error: You do not have a personal vehicle!"); format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", Iter_Count(MyVehicle[playerid]), GetSlots(playerid)); strcat(szDialog, "Vehicul\tStatus\tDespawn Time\tOthers details\n"); foreach(MyVehicle[playerid], car) { format(szDialog, sizeof(szDialog), "%s%s\t%s\t%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"), CheckDespawnCar(car), TotalUp(car)); PlayerInfo[playerid][pCarKey][x] = car; x++; } ShowPlayerDialog(playerid, type ? DIALOG_STICKET : DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit"); return true; }
-
Caut co-owner (partener) server samp
TheGodfather replied to TheGodfather's topic in Caut servicii / partener / etc.
up -
Caut co-owner (partener) server samp
TheGodfather replied to TheGodfather's topic in Caut servicii / partener / etc.
Ti-am dat add. -
Caut co-owner (partener) server samp
TheGodfather replied to TheGodfather's topic in Caut servicii / partener / etc.
up -
Salut, am un server de samp si am nevoie de o persoana care sa ma ajute cu popularea lui. Mai multe detalii discutam in privat, cine e interesat ma poate contacta pe discord: The Godfather#0066
-
Am incercat pe localhost si si pe server dar nu face nimic din pacate.
