Jump to content

Chase

Membru
  • Posts

    75
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Chase

  1. Incearca asa: YCMD:cars(playerid, params[], help) { new string[628], string1[228], string2[228], string3[228], string4[228], string5[228]; new valid = PlayerData[playerid][CarKey1] == 0 && PlayerData[playerid][CarKey2] == 0 && PlayerData[playerid][CarKey3] == 0 && PlayerData[playerid][CarKey4] == 0 && PlayerData[playerid][CarKey5] == 0; if(valid) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You don't have a vehicle!"); if(PlayerData[playerid][CarKey1] != 0) { new idd = PlayerData[playerid][CarKey1]; new locktext[6], spawntext[6]; if(CarInfo[idd][cLock] > 0) {locktext = "Yes";} else {locktext = "No";} if(CarInfo[idd][Spawned] > 0) {spawntext = "Yes";} else {spawntext = "No";} format(string1, sizeof(string1), "Model:[%s] Standard Price:[$%s] Locked:[%s] Spawned:[%s]", vehName[CarInfo[idd][cModel]-400], Decimal(CarInfo[idd][cValue]), locktext, spawntext); } if(PlayerData[playerid][CarKey2] != 0) { new idd = PlayerData[playerid][CarKey2]; new locktext[6], spawntext[6]; if(CarInfo[idd][cLock] > 0) {locktext = "Yes";} else {locktext = "No";} if(CarInfo[idd][Spawned] > 0) {spawntext = "Yes";} else {spawntext = "No";} format(string2, sizeof(string2), "Model:[%s] Standard Price:[$%s] Locked:[%s] Spawned:[%s]", vehName[CarInfo[idd][cModel]-400], Decimal(CarInfo[idd][cValue]), locktext, spawntext); } if(PlayerData[playerid][CarKey3] != 0) { new idd = PlayerData[playerid][CarKey3]; new locktext[6], spawntext[6]; if(CarInfo[idd][cLock] > 0) {locktext = "Yes";} else {locktext = "No";} if(CarInfo[idd][Spawned] > 0) {spawntext = "Yes";} else {spawntext = "No";} format(string3, sizeof(string3), "Model:[%s] Standard Price:[$%s] Locked:[%s] Spawned:[%s]", vehName[CarInfo[idd][cModel]-400], Decimal(CarInfo[idd][cValue]), locktext, spawntext); } if(PlayerData[playerid][CarKey4] != 0) { new idd = PlayerData[playerid][CarKey4]; new locktext[6], spawntext[6]; if(CarInfo[idd][cLock] > 0) {locktext = "Yes";} else {locktext = "No";} if(CarInfo[idd][Spawned] > 0) {spawntext = "Yes";} else {spawntext = "No";} format(string4, sizeof(string4), "Model:[%s] Standard Price:[$%s] Locked:[%s] Spawned:[%s]", vehName[CarInfo[idd][cModel]-400], Decimal(CarInfo[idd][cValue]), locktext, spawntext); } if(PlayerData[playerid][CarKey5] != 0) { new idd = PlayerData[playerid][CarKey5]; new locktext[6], spawntext[6]; if(CarInfo[idd][cLock] > 0) {locktext = "Yes";} else {locktext = "No";} if(CarInfo[idd][Spawned] > 0) {spawntext = "Yes";} else {spawntext = "No";} format(string5, sizeof(string5), "Model:[%s] Standard Price:[$%s] Locked:[%s] Spawned:[%s]", vehName[CarInfo[idd][cModel]-400], Decimal(CarInfo[idd][cValue]), locktext, spawntext); } format(string, sizeof(string), "%s\n%s\n%s\n%s\n%s", string1, string2, string3, string4, string5); ShowPlayerDialog(playerid, DIALOG_CARS, DIALOG_STYLE_LIST, "Server: Your Personal Cars", string, "Select", "Cancel"); return 1; }
  2. Nu inteleg ce ai facut tu. Eu ti-am lasat scriptul acela sa-l implementezi in gamemode-ul tau, sa nu spui ca nici la asta nu te pricepi.
  3. In locul vostru, inainte de a ma plange ca nu merge, as cauta pe tot internetul o solutie pentru rezolvarea problemei sau chiar si in alte moduri de joc. Ceea ce opreste acest fapt este generatia din ziua de azi care doreste totul pus pe "tava" din partea altora. Din pacate tu ai spus ca nu stii de unde sa incepi. Ti-as sugera o cautare pe google. Incearca astfel: new stock Chase_Vehicle_Name[][] = { "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "SWAT Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Streak", "Freight", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "LSPD Car", "SFPD Car", "LVPD Car", "Police Rancher", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville", "Tiller", "Utility Trailer" };ReturnVehicleModel(v_model) { new vehicle_name[52] = "None"; if (v_model < 400 || v_model > 611) return vehicle_name; format(vehicle_name, sizeof(vehicle_name), Chase_Vehicle_Name[v_model - 400]); return vehicle_name; }Iar formatul primului vehicul (inlocuiesti la toate): format(string,sizeof(string),"Vehicle 1: Model:[%s] Locked:[%s] KM:[%.2f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s] Neon:[%s]",ReturnVehicleModel(CarData[carid][carModel]),locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue]),neon);
  4. Nu am spus sa le scoti, am zis doar sa le lasi mai sfarsit. Adauga-le inapoi la coada. Daca nici asa nu merge, actualizeaza streamer-ul.
  5. Poate datorita unui plugin ce se afla in fata streamer-ului esueaza incarcarea. Incearca sa schimbi ordinea intre ele si sa pui plugin-urile importante primele (streamer, mysql, sscanf).
  6. Incearca sa pui plugin-urile fara terminatia .dll Exemplu: plugins streamer sscanf mysql etc..
  7. Poftim comanda goto CMD:goto(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(PlayerInfo[playerid][pAdmin] < 1 && !PlayerInfo[playerid][pHelper]) return SendClientMessage(playerid, COLOR_WHITE, "{5CAD5C}Error: Your admin/helper level isn't high enough to use this command."); new id; if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /goto <Name/Playerid>"); if(Spectate[id] != 255) return SCM(playerid,COLOR_WHITE,"{FFB870}This player use /recon."); { if(id != INVALID_PLAYER_ID) { new Float:ax,Float:ay,Float:az; GetPlayerPos(playerid,ax,ay,az); posxxx[playerid] = ax; posyyy[playerid] = ay; poszzz[playerid] = az; new Float:x, Float:y, Float:z; GetPlayerPos(id, x, y, z); new tmpcar = GetPlayerVehicleID(playerid); if (GetPlayerState(playerid) == 2) { SetVehiclePos(tmpcar, x, y+4, z); } else { SetPlayerPos(playerid,x,y+2, z); } SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); SetPlayerInterior(playerid, GetPlayerInterior(id)); if(InHouse[id] > 0) { InHouse[playerid] = InHouse[id]; } if(InHQ[id] > 0) { InHQ[playerid] = InHQ[id]; } if(InBussines[id] > 0) { InBussines[playerid] = InBussines[id]; } SendClientMessage(playerid, COLOR_GRAD1, "You have been teleported."); } else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); } return 1; }
  8. Defapt te contrazic. Ceea ce ti-am lasat eu acolo, apare si in gamemode-ul meu vechi si functioneaza. Incearca totusi si ce a zis NoNamed.
  9. Nu este eroare. Incearca sa pui asta la inceputul scriptului (sub include-uri): #pragma tabsize 0 #pragma dynamic 22572 //Sau o valoare mai mare, in cazul in care 22572 nu este suficient.
  10. Scoate de la sfarsit: if(!response) { SendClientMessage(playerid,COLOR_WHITE,"Ai anulat comanda !"); return 1; }si cauta la OnDialogResponse dialogul specific (in cazul nostru dialogul de autentificare) si pune la sfarsit la inceput, cum ti-am mai spus: if(!response) return Kick(playerid); Adica, va arata cam asa: if(dialogid == "Numar dialog autentificare") { if(!response) return Kick(playerid); // Restul dialogului return 1; }Daca nu gasesti, cauta-l, trebuie sa fie...tu stii cel mai bine ce ai in gamemode.
  11. Incearca asa: CMD:warn(playerid, params[]) { new year, month,day; new targetid, motiv[100], string[256]; getdate(year, month, day); if(sscanf(params,"us[99]",targetid,motiv)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /warn [playerid/numejucator] [reason]"); if(targetid != INVALID_PLAYER_ID) { if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Nu poti da warn unui administrator cu rangul mai mare ca al tau."); if(PlayerInfo[targetid][pWarns] < 3) { PlayerInfo[targetid][pWarns] += 1; Update(targetid,pWarningsx); format(string, sizeof(string), "I-ai dat lui %s 1 punct de WARN din motivul: %s", GetName(targetid), motiv); SendClientMessage(playerid, COLOR_GREY,string); format(string, sizeof(string), "Ai primit de la adminul %s Warn +1 deoarece: %s", GetName(playerid), motiv); SendClientMessage(targetid, COLOR_GREY,string); } else { format(string, sizeof(string), "AdmCmd: %s a primit ban de la %s(3 warns), motiv: %s (%d-%d-%d) \n", GetName(targetid), GetName(playerid), motiv, month, day, year); format(string, sizeof(string), "%s{0066FF}Info: %s{a9c4e4} a primit ban de la %s (3 Warns), motiv: %s", string, GetName(targetid), GetName(playerid), motiv); SendClientMessageToAll(COLOR_LIGHTRED, string); PlayerInfo[targetid][pReg] = -999; Update(targetid,pRegisteredx); PlayerInfo[targetid][pWarns] = 0; Update(targetid,pWarningsx); new playersip[256]; GetPlayerIp(targetid,playersip,sizeof(playersip)); strmid(PlayerInfo[targetid][pIP], playersip, 0, 100, 255); Update(targetid, pIPx); Kick(targetid); ExecCMD[playerid]++; return 1; } } else { format(string, sizeof(string), " %d nu este conectat.", targetid); SendClientMessage(playerid, COLOR_GRAD1, string); } SaveExecCMDS(playerid, "/warn", ExecCMD[playerid]); return 1; } stock GetName( playerid ) { new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid,name,sizeof(name)); return name; }
  12. Arata-mi putin OnDialogResponse
  13. Chase

    Problema Dialog

    if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][phelikey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}You do not have a vehicle."); new stringy[728],string1[428],string2[456],string3[456],string4[456],string5[456],string6[456]; if(PlayerInfo[playerid][pPcarkey] != 0) { new carid = PlayerInfo[playerid][pPcarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string1,sizeof(string1),"Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } if(PlayerInfo[playerid][pmotokey] != 0) { new carid = PlayerInfo[playerid][pmotokey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string2,sizeof(string2),"Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } if(PlayerInfo[playerid][pprcarkey] != 0) { new carid = PlayerInfo[playerid][pprcarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string3,sizeof(string3),"Premium Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } if(PlayerInfo[playerid][pprcarkey2] != 0) { new carid = PlayerInfo[playerid][pprcarkey2],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string4,sizeof(string4),"Premium Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } if(PlayerInfo[playerid][pPPluscarkey] != 0) { new carid = PlayerInfo[playerid][pPPluscarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string5,sizeof(string5),"Plus Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } if(PlayerInfo[playerid][pPPluscarkey2] != 0) { new carid = PlayerInfo[playerid][pPPluscarkey2],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string6,sizeof(string6),"Plus Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); } format(stringy, sizeof(stringy), "%s\n%s\n%s\n%s\n%s\n%s",string1,string2,string3,string4,string5,string6); ShowPlayerDialog(playerid, DIALOG_CARSS, DIALOG_STYLE_MSGBOX, "Cars Info:", stringy,"Back","Exit"); } CMD:betacmd(playerid,params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { ShowPlayerDialog(playerid,DIALOG_CARSS2,DIALOG_STYLE_LIST, "Car Tool:", "1.Cars Info\n2.Spawn your car.", "Select","Exit"); } return 1; }Incearca asa.
  14. Pune la dialogul respectiv: if(!response) return Kick(playerid);
  15. CMD:unfreeze(playerid, params[]) { new playa; new sendername[MAX_PLAYER_NAME], string[256],giveplayername[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTrial] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "** Nu ai rangul administrativ necesar!"); if(sscanf(params, "u", playa)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /unfreeze [playerid / part of name]"); if(playa != INVALID_PLAYER_ID && IsPlayerConnected(playa)) { GetPlayerName(playa, giveplayername, sizeof(giveplayername)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerControllable(playa, 1); format(string, sizeof(string), "{0066FF}[Info:] {FFFFFF}%s i-a dat unfreeze lui %s",sendername, giveplayername); IsFreezed[playa] = 0; format(string, sizeof(string), "{0066FF}[Info:] {FFFFFF}%s a primit unfreeze de la %s",playerid ,sendername); ABroadCast(COLOR_LIGHTRED,string,1); ExecCMD[playerid]++; } SaveExecCMDS(playerid, "/unfreeze", ExecCMD[playerid]); return 1; }
  16. Chase

    BMX Stunt Map 2

    Arata mai bine mapa 2, decat mapa 1 pe care ai facut-o. Bravo.
  17. Deschide baza de date ajutandu-te de Notepad si copiaza fiecare tabel in parte, urmand sa le implementezi in phpmyadmin cu ajutorul butonului "SQL" de sus. Iei fiecare tabel in parte, iar daca ai si ceva date in respectivele tabele, le pui in phpmyadmin pe urma, tot cu functia "SQL" (In baza de date iti va aparea cu INSERT INTO, copiezi codul si il lipesti in SQL.).
  18. Avertismentele spun totul. Nu ai aranjat bine in pagina un anumit script. In a doua poza, linia : if(tazer[playerid] == 1 && IsACop(playerid) && weaponid == 24)trebuie adusa exact sub paranteza de deasupra.
  19. Chase

    Problema PayDay

    Pe langa acele timere, pune si timer-ul care ti l-am lasat mai sus...este asa de greu?
  20. Chase

    Problema PayDay

    La callback-ul OnGameModeInit, ar trebui sa ai un timer de genul acesta: SetTimer("PayDay", 60000, 1); 60000 semnifica 60 de minute (o ora), adica timer-ul va trece prin callback-ul "Payday" o data la o ora. 1 semnifica repetarea timer-ului atunci cand s-a scurs cele 60 de minute.
  21. Chase

    Problema PayDay

    Ai timer-ul "Payday" ?
  22. Include-ul este foarte folositor pentru multi, insa ar cam trebui actualizat pentru versiunea 0.3.7.
  23. Nu neaparat poate apela la acel callbacks, pentru ca astfel, cum ai zis tu, atunci cand va apasa pe H sau ce cheie are el pentru claxon, va aparea/disparea acel girofar in mod constant, ceea ce va creea mai multe neplaceri. Poti apela la noua functie implementata in 0.3.7 https://wiki.sa-mp.com/wiki/OnVehicleSirenStateChange https://wiki.sa-mp.com/wiki/GetVehicleParamsSirenState Gandeste-te la o strategie pentru crearea acestui sistem. Eu unul, pe serverul meu de teste, in momentul in care pornesti sirena apare un girofar pe plafonul masinii, iar cand o opresti sa dispara si mi se pare destul de ok.
  24. Chase

    Ajutor dialog

    Micsoreaza numarul dialogului. In loc de 290198 pune alt numar, mai mic. Cand zic "mai mic" nu ma refer sa miscorezi numarul cu o cifra/doua. Creeaza alt numar format din 3/4 cifre, care sa nu fie folosit de alte dialoguri.
×
×
  • 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.