
bandi94
Members-
Posts
1,037 -
Joined
-
Last visited
Everything posted by bandi94
-
ok thx
-
oh i think i don't expain it to good i have 600 account's on the server on each account have the point's and i wanna to put the account's in descending order from points ex acc1 have 50 point acc2 100 acc3 1 acc4 150 and then i need to put the account's in a descending order like Top={acc4,acc2,acc1,acc3} now i do this whit 2 for .... it get the firt's account and compare it whit all account's and after secound account again compare it whit all account's and whit 600 account the 2 for.. loop's 600*600=360000 time and i get Abording script going to infinity (i think bk the 360000 loop is to much)
-
is some another function that can calculate top from account data and put it into a Tabel the account or account name in descending order ? in this script i use 2 for whit get accounts() and i have 600 accounts on server and then it check 600 account 1 by one and then the 2 for need to run 600*600=360000 and i don't know maybe the server take it like infinity bk is to much ? bk i don't see another error in the script ? pls help i need this soon as possible thx
-
1. this is a part of big script 2. this sript show firs't 25 toptime 3. calculate top time from account data 4. client ask the top server side calculate them and send it back to client 5. my problem is that i get running for infiniti error (i think on server side ) on the main Linux server on my local host Window's server worked fine 6.that's all ...
-
the script is a huge Panels system over 3000 line's so i will post only the par whit the error the error is on the top calculation on my local hosted windows server (test server) worked fine on the Web szerver (Linux) it gives ruuning to infinite here is the script par: EDIT: ok i think it loop for infinity on server side bk if trigger the server side the label's need to set text "" and it dosen't set to"" so the server don't trigger the client = somewhere on server side get infinity loop Client : function Topkap(Top,Nev,Szam,k) for u=1,22 do guiSetText(La[u],"") end local topm=1 local topsz=1 for i,a in pairs(Top) do if topm==23 then break end for q,w in pairs(Top) do if Top[q]==topsz then Topk[topm]=Top[q] Nevk[topm]=Nev[q] Szamk[topm]=Szam[q] topm=topm+1 end end topsz=topsz+1 end for ip=1,22 do if not Nevk[ip] then Nevk[ip]="Unknow" end if not Topk[ip] then Topk[ip]="Unknow" end if not Szamk[ip] then Szamk[ip]="Unknow" end if Topk[ip]~= "Unknow" and Szamk[ip]~="Unknow" then if k=="hunterPoints" then guiSetText(La[ip]," "..Topk[ip].." "..Nevk[ip].." "..Szamk[ip].." win") elseif k== "penz" then guiSetText(La[ip]," "..Topk[ip].." "..Nevk[ip].." "..Szamk[ip].." $") elseif k== "timeplayed" then local time=Szamk[ip] local ora = tostring(math.floor(time/60)) local perc=time-tonumber((math.floor(ora * 60))) if tonumber(perc)<=9 then perc="0"..perc end if tonumber(ora)<=9 then ora="0"..ora end guiSetText(La[ip]," "..Topk[ip].." "..Nevk[ip].." "..ora.." : "..perc.." h") elseif k== "mapplayed" then guiSetText(La[ip]," "..Topk[ip].." "..Nevk[ip].." "..Szamk[ip].." map") end server side : ----------------------------Stati------------------------------------------------ Top={} Nev={} Szam={} function topsz(value)---------value is the account data name bk i have 4 top categori local a1=getAccounts() local p1 local p2 local top for i,v in pairs(a1) do p1=getAccountData(v,value) top=1 if not p1 then p1=0 end for q,w in pairs(a1) do p2= getAccountData(w,value) if not p2 then p2=0 end if tonumber(p1)(p2) then top=top+1 end end Top[i]=top Nev[i]=getAccountData(v,"nev") or "Unknow" Szam[i]=p1 end local va=value triggerClientEvent(source,"topszkap",source,Top,Nev,Szam,va) end addEvent("topszket",true) addEventHandler("topszket",getRootElement(),topsz) thx for helping i am study this problem over 2 hour's and i don't figured out why on the test server is ok and on the Linux one is running to infinity thx for helping
-
i wanna make a for..... but i wanna make it loop for 22 times in C++ is for(i=1;i<=22;i++) but i don't know it for LUA can somebody help thx
-
i am study C++ for 3 ears and its much harder that LUA and LUA is based on C++ only he have the special command's for MTA but you can learn that from wiki so MTA LUA is 50% C++ based
-
i have a question can i find somewhere the range file edited whit the full name of the country i mean like "1,65535,France" if not i will edit it but i don't have to much time and it's better if i find it done thx
-
try this local Police = createTeam ("Police", 0, 0, 255) function SetPlayerPolice() setPlayerTeam (source, getTeamFromName("Police")) setElementModel (source, 280) giveWeapon ( source, 22, 15 ) setElementData ( source, "Officer",true ) end addEvent("PoliceTeam",true) addEventHandler("PoliceTeam", root, SetPlayerPolice)
-
this is funny OMG i make it a long time ago i don't remember if then it was SetControlState on server side or i don't find it i was trying whit setPedControlState EDIT: but SetControlState it's only for player's "thePlayer: The player you wish to set the control state of." so if i am right you can't control a Ped created whit createPed
-
its possible but you have 2 problem's on server side you can move only an object attached to a bus result is the bus is moving but its not realistic now you can move the bus realistic but only on client side now again you can chose or for every player you make a bus and then only that player can see the bus or you can make 1 bus for all player's but then you need to synchronize for every player a long time ago i start making one but i don't finished it bk I decided that are to many RPG server's and i start making an another gamemod so on my idea i was trying to add race checkpoints on the road and when the bus hit it triggered a cilent side script and make a change on the vehicle Control
-
i think he explain you the sound is begin played but you can hear it from distance i took a quick look at the script and look's fine you tryed whit that scirpt ?
-
it wouldn't be a stupid think bk it will request admin rigt's i need it for a database backup bk on this day something f*** up the database of my server and i lost all account's and data's on it win count money everything .... and are some player's who raised money 2-3 months and now 0 so ... and i wanna make an xml file backup whit all account's name password and datas on it if i los the account's again whit a simpel script i can create the account's and set the data's on it
-
is a way to get the Password of an accoun-t? i mean whit getAccounts() then for all account's get the password for each one thx
-
in the mtaserver.conf you have a FPS Limit option
-
debugscript 3 is only for admin's so your resource need's admin right's to execute that command hander
-
Whit Dx the best is to check the client screen size and then if zise .....=1280x720 then post x,y,z=...... elseif .... or use guiLabel and use bool relative as true and then its automaticaly sized and moved
-
omg man on a client side script the client download the xml file from server and then every client can edit that file ...
-
its working you joke whit only Server Side? i have Autologin on XML base
-
yes is server side buy you can't start a resource for only 1 person if you start 1 resource it will start for all player's on the server you can only edit that script whit a on/off command like ex. local on then your command make it on=true if on then .... your script on Client side bk every player downloaded your scripts
-
that resource will be downloaded for all player what you can do is that you make in your script on/off part and the player can start/stop your script ( in client side) if i am wrong then another's will help you
-
try this or use /debugscript 3 to find where is the problem addEventHandler("onVehicleEnter",getRootElement(), function(player,seat,jacked) if (player) then if (seat == 0) then veh = getPedOccupiedVehicle(player) bindKey(player,"l","down",sirens) end end end) addEventHandler("onVehicleStartExit",getRootElement(), function(player,seat,jacked) if (player) then if (seat == 0) then unbindKey(player,"l","down") end end end) function sirens() if not getVehicleSirensOn ( veh ) then setVehicleSirensOn ( veh, true ) --Turn it on else setVehicleSirensOn ( veh, false ) --Turn it off end end
-
thx man i compressed and i make 17mb from 75
-
i donwloaded some cutsom skin's for a new server dff,txd now i have 8 skins and i need to add 8 = 16 now the 8 skins is 75mb +75=150mb WOW WTF.... now my problem is the dff is under or 1 mb the txd is the problem the smaler txd is 5 mb and the larger is 15 mb can i compress them to make it smaler if yes how ?