Jump to content

newbie.

Membru
  • Posts

    51
  • Joined

  • Last visited

Everything posted by newbie.

  1. Problema intalnita (descriere): Dupa ce duc marfa nu imi pune checkpointul de unde trebuie sa aleg iarasi o marfa din dialog.Ero(area / rile) / warning-(ul / urile): -Liniile de cod / sursa / script-ul(obligatoriu): if(Trucker[playerid] >= 1) { new pertransport; if(!IsPlayerInAnyVehicle(playerid)) return 1; if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) && IsATruck(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_WHITE, "Nu ai niciun trailer atasat!"); DestroyVehicle(viddd[playerid]); DisablePlayerCheckpoint(playerid); viddd[playerid] = 0; if(Trucker[playerid] == 1) { pertransport = 60000 + random(15000); Trucker2[playerid] = 2; SetPlayerCheckpoint(playerid,CHKTruck2[2][0],CHKTruck2[2][1],CHKTruck2[2][2],5.0); } else if(Trucker[playerid] == 2) { pertransport = 70000 + random(20000); Trucker2[playerid] = 2; SetPlayerCheckpoint(playerid,CHKTruck2[4][0],CHKTruck2[4][1],CHKTruck2[4][2],5.0); } else if(Trucker[playerid] == 3) { pertransport = 70000 + random(20000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[11][0],CHKTruck2[11][1],CHKTruck2[11][2],5.0); } else if(Trucker[playerid] == 4) { pertransport = 70000 + random(30000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[10][0],CHKTruck2[10][1],CHKTruck2[10][2],5.0); } else if(Trucker[playerid] == 5) { pertransport = 60000 + random(35000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[7][0],CHKTruck2[7][1],CHKTruck2[7][2],5.0); } else if(Trucker[playerid] == 6) { pertransport = 90000 + random(40000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[6][0],CHKTruck2[6][1],CHKTruck2[6][2],5.0); } else if(Trucker[playerid] == 7) { pertransport = 60000 + random(30000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[8][0],CHKTruck2[8][1],CHKTruck2[8][2],5.0); } else if(Trucker[playerid] == 8) { pertransport = 60000 + random(27000); Trucker2[playerid] = 3; SetPlayerCheckpoint(playerid,CHKTruck2[9][0],CHKTruck2[9][1],CHKTruck2[9][2],5.0); } else if(Trucker[playerid] == 9) { pertransport = 60000 + random(23000); Trucker2[playerid] = 2; SetPlayerCheckpoint(playerid,CHKTruck2[3][0],CHKTruck2[3][1],CHKTruck2[3][2],5.0); } else if(Trucker[playerid] == 10) { pertransport = 70000 + random(22000); Trucker2[playerid] = 2; SetPlayerCheckpoint(playerid,CHKTruck2[5][0],CHKTruck2[5][1],CHKTruck2[5][2],5.0); } else if(Trucker[playerid] == 11) { pertransport = 60000 + random(20000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[12][0],CHKTruck2[12][1],CHKTruck2[12][2],5.0); } else if(Trucker[playerid] == 12) { pertransport = 90000 + random(22000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[13][0],CHKTruck2[13][1],CHKTruck2[13][2],5.0); } else if(Trucker[playerid] == 13) { pertransport = 60000 + random(22000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[17][0],CHKTruck2[17][1],CHKTruck2[17][2],5.0); } else if(Trucker[playerid] == 14) { pertransport = 70000 + random(280000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[15][0],CHKTruck2[15][1],CHKTruck2[15][2],5.0); } else if(Trucker[playerid] == 15) { pertransport = 70000 + random(31000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[16][0],CHKTruck2[16][1],CHKTruck2[16][2],5.0); } else if(Trucker[playerid] == 16) { pertransport = 60000 + random(30000); Trucker2[playerid] = 4; SetPlayerCheckpoint(playerid,CHKTruck2[14][0],CHKTruck2[14][1],CHKTruck2[14][2],5.0); } else if(Trucker[playerid] == 17) { pertransport = 70000 + random(25000); Trucker2[playerid] = 1; SetPlayerCheckpoint(playerid,CHKTruck2[0][0],CHKTruck2[0][1],CHKTruck2[0][2],5.0); } else if(Trucker[playerid] == 18) { pertransport = 75000 + random(15000); Trucker2[playerid] = 2; SetPlayerCheckpoint(playerid,CHKTruck2[1][0],CHKTruck2[1][1],CHKTruck2[1][2],5.0); } new string[156]; playerVariables[playerid][pMoney] += pertransport; Trucker[playerid] = 0; format(string,sizeof(string),"(+) Ai primit $%s pentru livrarea marfii.", NumberFormat(pertransport)); SendClientMessage(playerid, COLOR_ATTACK, string); } else if(Trucker2[playerid] == 1) //Langa Gas Station(primul) { SetTimerEx("Truckerr1", 200, 0, "i",playerid); } else if(Trucker2[playerid] == 2)//IN LS { SetTimerEx("Truckerr2", 200, 0, "i",playerid); } else if(Trucker2[playerid] == 3)//IN LV { SetTimerEx("Truckerr3", 200, 0, "i",playerid); } else if(Trucker2[playerid] == 4)//IN SF { SetTimerEx("Truckerr4", 200, 0, "i",playerid); } Iar CHKTruck new Float:CHKTruck2[18][3] = { {-119.2522,-1218.2719,2.9902}, //LANGA GAS LS ---- CHECKS LS {1361.1011,-906.6476,35.3157}, //LANGA 24/7 Store LS {2078.8257,-1706.9739,13.3906}, //LANGA Pizza Boy LS {2683.8926,-1683.9061,9.4250}, //LANGA 8 Track LS {2609.1416,-2393.7742,13.6271}, //LANGA Chop Shop LS {2158.9236,-1725.8071,13.5389}, //LANGA Crack House LS {2101.4238,2803.3069,10.8203}, //near GAS LV ---- CHECKS LV {2116.0403,2189.2769,10.8203}, //LANGA Clothing Soter LV {2426.0283,2005.2286,10.8203}, //LANGA Burger Shot LV {2478.9539,1640.6306,10.8203}, //near Pool LV {2029.4589,1418.5114,10.8203}, //LANGA Pirate Ship LV {1441.4424,1005.0969,10.8203}, //LANGA Chuckup LV {-1731.8619,-71.2586,3.5489}, //near Ship SF ---- CHECKS SF {-1714.7142,352.0824,7.1875}, //LANGA GAS SF {-1647.4458,1291.6462,7.0391}, //LANGA Pier 69 SF {-2132.7087,769.0834,69.5625}, //near Supa Save SF {-2468.7771,1231.8475,35.2001}, //LANGA Restaurant SF {-2184.9126,-409.3924,35.3359} //LANGA Homies SF }; Imagini / Video (optional): -Ati incercat sa rezolvati singur?: Da... dar tot nu merge.
  2. am facut update la streamer si a functionat, mi-au aparut toate obiectele. mersi oricum.
  3. Problema intalnita (descriere): Cad prin mapa la CNN LS, am mai rezolvat o data asta si nu mai tin minte cum... am mai vazut si pe alte servere la fel faceaEro(area / rile) / warning-(ul / urile): -Liniile de cod / sursa / script-ul(obligatoriu): -Imagini / Video (optional): http://imgur.com/a/6NdraAti incercat sa rezolvati singur?: Da. am incercat sa pun toate obiectele create dintr-un backup dar degeaba. Daca stie cineva cum..
  4. Problema intalnita (descriere): Am făcut ca atunci când un player ia un truck de la job, să se spawneze altul în locul lui, iar atunci când playerul iese din truck, acel truck să se distrugă, și să rămână cel spawnat, dar nu se spawnează truckul, iar dacă se spawnează, nu i se atribuie valoarea de la job.Ero(area / rile) / warning-(ul / urile): ---.Liniile de cod / sursa / script-ul(obligatoriu): OnPlayerEnterVehicle --> if(vehicleVariables[newcar][vVehicleJob] == 11) { SetTimerEx("CreateTrucker", 10000, 1, "d", playerid); CP[playerid] = 9; SetPlayerCheckpoint(playerid, -125.4149,-1121.8895,2.9998, 5.0); SCM(playerid, -1, "Du-te la checkpoint sa incepi munca"); }forward CreateTrucker --> forward CreateTrucker(playerid); public CreateTrucker(playerid) { if(vehicleVariables[GetPlayerVehicleID(playerid)][vVehicleJob] == 11) { new pTruckID; pTruckID = CreateVehicle(515, -32.176, -1132.088, 1.734, 65.293, 0, 0, 15); vehicleVariables[pTruckID][vVehicleJob] = 11; } }Imagini / Video (optional): -.Ati incercat sa rezolvati singur?: Da, am pus sa se distruga dar nu merge.
  5. enum wInfo { wFaction, wAttacker, wTime, } new WarInfo[49][wInfo];
  6. tot aia îmi dă (array of index out of bounds), la aceași linie new att = WarInfo[i][wAttacker];
  7. da, aceași eroare doar că la linia următoare, adică la asta new att = WarInfo[i][wAttacker];
  8. era pusă 256, o să încerc cu 512 și revin cu edit. //edit - nu mai dă la linia aia, dar acum dă la următoarea, adică la new att = WarInfo[i][wAttacker];
  9. Îmi cer scuze, dar cred că nu ai observat în codul pus de mine new string[56], count = 0; // <--- asta e liniaAi tot în acel cod, și cu câteva linii mai sus / mai jos.
  10. Problema intalnita (descriere): Array of index out of bounds. Ero(area / rile) / warning-(ul / urile): [12:05:27] [debug] Accessing element at index 49 past array upper bound 48 [12:05:27] [debug] AMX backtrace: [12:05:27] [debug] #0 00051f28 in public SetPlayerUnjail () at C:\Users\Alex\Desktop\vx-rp edit\gamemodes\vx-rp.pwn:6411 Liniile de cod / sursa / script-ul(obligatoriu): for(new iGroup; iGroup < MAX_GROUPS; iGroup++) { if(groupVariables[iGroup][gDeelay] >= 1) { groupVariables[iGroup][gDeelay]--; } } for(new i = 0; i <= sizeof(TurfInfo); i++) { new string[56], count = 0; // <--- asta e linia new att = WarInfo[i][wAttacker]; new deff = WarInfo[i][wFaction]; if(WarInfo[i][wTime] > 0) { Imagini / Video (optional): -. Ati incercat sa rezolvati singur?: Da.
  11. mersi, dar nu mai contează, am rezolvat. Vă rog T/C.
  12. nu testez direct pe server, asta am testat cu un prieten pe localhost, am scos timeru de la ongamemodeinit și l-am pus la comanda /spec, iar când dau asta, îi dă pe toți în aer, ca și cum ar fi ei spectatori.
  13. newbie.

    Ajutor.

    de obicei aceste erori cu ; sunt cu câteva linii deasupra, postează cu 3-4 linii mai sus.
  14. ok, dacă pun la ongamemodeinit nu îmi mai apare login, etc. iar dacă pun la comanda /spec -> SetTimer("spectimer", 2000, 1); atunci când dau /spec pe cineva îi lasă pe toți în aer și pică serveru, de ce?
  15. forward spectimer(playerid); public spectimer(playerid) { { { { Interior[playerid] = GetPlayerInterior(playerid); VirWorld[playerid] = GetPlayerVirtualWorld(playerid); TogglePlayerSpectating(playerid, 1); playerVariables[playerid][pSpectating] = userID; if(IsPlayerInAnyVehicle(userID)) { new string[500]; new Float: health; GetPlayerHealth(userID, health); new Float:health2; new veh = GetPlayerVehicleID(userID); GetVehicleHealth(veh, health2); new Speed = GetSpeed(userID); format(string, 500,"%s [~r~%i~w~] - L [~r~%i~w~]", playerVariables[userID][pNormalName], userID,playerVariables[userID][pLevel]); TextDrawSetString(info[playerid], string); format(string, 500,"Health: ~r~%.0f~w~", health); TextDrawSetString(viata[playerid], string); format(string, 500,"W: [~r~%d~w~] - Jail: [~r~%d~w~ minutes]", playerVariables[userID][pWarrants], playerVariables[userID][pPrisonTime] / 60); TextDrawSetString(wantedjail[playerid], string); format(string, 500,"Car ~r~%d~w~ [~r~%.0f~w~ HP]", GetPlayerVehicleID(userID), health2); TextDrawSetString(carinfo[playerid], string); format(string, 500,"Speed: ~g~%d KM/H~w~", Speed); TextDrawSetString(carspeed[playerid], string); TextDrawShowForPlayer(playerid, info[playerid]); TextDrawShowForPlayer(playerid, carspeed[playerid]); TextDrawShowForPlayer(playerid, carinfo[playerid]); TextDrawShowForPlayer(playerid, viata[playerid]); TextDrawShowForPlayer(playerid, wantedjail[playerid]); DamageLog[playerid] = 1; PlayerSpectateVehicle(playerid, GetPlayerVehicleID(userID)); } else { new string[500]; new Float: health; GetPlayerHealth(userID, health); new Float:health2; new veh = GetPlayerVehicleID(userID); GetVehicleHealth(veh, health2); format(string, 500,"%s [~r~%i~w~] - L ~r~%i~w~", playerVariables[userID][pNormalName], userID,playerVariables[userID][pLevel]); TextDrawSetString(info[playerid], string); format(string, 500,"Health: [~r~%.0f~w~]", health); TextDrawSetString(viata[playerid], string); format(string, 500,"W: [~r~%d~w~] - Jail: [~r~%d~w~] minutes", playerVariables[userID][pWarrants], playerVariables[userID][pPrisonTime] / 60); TextDrawSetString(wantedjail[playerid], string); TextDrawShowForPlayer(playerid, info[playerid]); TextDrawShowForPlayer(playerid, viata[playerid]); TextDrawShowForPlayer(playerid, wantedjail[playerid]); DamageLog[playerid] = 1; PlayerSpectatePlayer(playerid, userID); } new Float:HAFloats, country[MAX_COUNTRY_NAME]; GetPlayerHealth(userID,HAFloats); GetCountryName(playerVariables[userID][pConnectionIP], country, sizeof(country)); format(szMessage, sizeof(szMessage), "(%i) %s | Level: %i | Health: %.1f | Status: %d | Country: %s | Ping: %i",userID, GetName(userID),playerVariables[userID][pLevel], HAFloats,playerVariables[userID][pStatus],country, GetPlayerPing(userID)); SCM(playerid,COLOR_IN2, szMessage); } } } }
  16. am făcut chestia asta dar nu mi se compilează deloc...
  17. Problema intalnita (descriere): Nu se actualizează spec, de ex. sunt spec pe unu care e în mașină și are viteza de 30km/h, normal viteza crește cu cât merge mai repede, dar rămâne blocată. La fel, când nu e în mașină și intră în una, tre să mă dau off de pe spec și să dau iară pe el. Liniile de cod / sursa / script-ul(obligatoriu):: CMD:spec(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1 || playerVariables[playerid][pHelper] >= 1) { new userID; if(sscanf(params, "u", userID)) { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/spec [playerid]"); } else if(!IsPlayerConnectedEx(userID)) { return SendClientMessage(playerid, COLOR_GREY, "The specified player is not connected, or has not authenticated."); } else if(playerVariables[playerid][pWarrants] >= 1) { return SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone."); } else if(playerVariables[playerid][pPrisonTime] >= 1) { return SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail."); } else { if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) { GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]); Interior[playerid] = GetPlayerInterior(playerid); VirWorld[playerid] = GetPlayerVirtualWorld(playerid); TogglePlayerSpectating(playerid, 1); playerVariables[playerid][pSpectating] = userID; if(IsPlayerInAnyVehicle(userID)) { new string[500]; new Float: health; GetPlayerHealth(userID, health); new Float:health2; new veh = GetPlayerVehicleID(userID); GetVehicleHealth(veh, health2); new Speed = GetSpeed(userID); format(string, 500,"%s [~r~%i~w~] - L [~r~%i~w~]", playerVariables[userID][pNormalName], userID,playerVariables[userID][pLevel]); TextDrawSetString(info[playerid], string); format(string, 500,"Health: ~r~%.0f~w~", health); TextDrawSetString(viata[playerid], string); format(string, 500,"W: [~r~%d~w~] - Jail: [~r~%d~w~ minutes]", playerVariables[userID][pWarrants], playerVariables[userID][pPrisonTime] / 60); TextDrawSetString(wantedjail[playerid], string); format(string, 500,"Car ~r~%d~w~ [~r~%.0f~w~ HP]", GetPlayerVehicleID(userID), health2); TextDrawSetString(carinfo[playerid], string); SetTimer("VitezaSPEC", 1000, true); format(string, 500,"Speed: ~g~%d KM/H~w~", Speed); TextDrawSetString(carspeed[playerid], string); TextDrawShowForPlayer(playerid, info[playerid]); TextDrawShowForPlayer(playerid, carspeed[playerid]); TextDrawShowForPlayer(playerid, carinfo[playerid]); TextDrawShowForPlayer(playerid, viata[playerid]); TextDrawShowForPlayer(playerid, wantedjail[playerid]); DamageLog[playerid] = 1; PlayerSpectateVehicle(playerid, GetPlayerVehicleID(userID)); } else { new string[500]; new Float: health; GetPlayerHealth(userID, health); new Float:health2; new veh = GetPlayerVehicleID(userID); GetVehicleHealth(veh, health2); format(string, 500,"%s [~r~%i~w~] - L ~r~%i~w~", playerVariables[userID][pNormalName], userID,playerVariables[userID][pLevel]); TextDrawSetString(info[playerid], string); format(string, 500,"Health: [~r~%.0f~w~]", health); TextDrawSetString(viata[playerid], string); format(string, 500,"W: [~r~%d~w~] - Jail: [~r~%d~w~] minutes", playerVariables[userID][pWarrants], playerVariables[userID][pPrisonTime] / 60); TextDrawSetString(wantedjail[playerid], string); TextDrawShowForPlayer(playerid, info[playerid]); TextDrawShowForPlayer(playerid, viata[playerid]); TextDrawShowForPlayer(playerid, wantedjail[playerid]); DamageLog[playerid] = 1; PlayerSpectatePlayer(playerid, userID); } new Float:HAFloats, country[MAX_COUNTRY_NAME]; GetPlayerHealth(userID,HAFloats); GetCountryName(playerVariables[userID][pConnectionIP], country, sizeof(country)); format(szMessage, sizeof(szMessage), "(%i) %s | Level: %i | Health: %.1f | Status: %d | Country: %s | Ping: %i",userID, GetName(userID),playerVariables[userID][pLevel], HAFloats,playerVariables[userID][pStatus],country, GetPlayerPing(userID)); SCM(playerid,COLOR_IN2, szMessage); } else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time."); } } else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly); return 1; }Ero(area / rile) / warning-(ul / urile): - Ati incercat sa rezolvati singur?: să fac toată asta într-un timer dar nu știu cum să-l pun la comanda /spec Imagini / Video (optional): -
  18. mulțan fain, îmi pare rău, da sunt cam prost :-s.
  19. De ce dracu ar trebui să arăt textdrawul când ăsta e codul? Gândești? Eu am zis că nu se ACTUALIZEAZĂ, nu că nu apare.
×
×
  • 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.