Redox
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by Redox
-
Ok ;> I have another question. I have in script code like this: Load data setElementData ( source, "skin", getAccountData ( konto, "skin" )) Save data: setAccountData (konto,"skin",getElementData(source,"skin")) And this doesn't work. I don't have idea what can I do.
-
Ahh, thanks. I forgot about this function.
-
But I don't know what I have to do. I haven't any errors/warnings.
-
Hi, I have question. Can I do array like 'xxx = { }' and save this when player has left server? I try to do like this: xxx = { } addEventHandler ( "onPlayerLogin", getRootElement(), function () local konto = getPlayerAccount(source) if ( konto ) then xxx[source] = getAccountData ( konto, "xxx" ) end end ) addEventHandler ( "onPlayerQuit", getRootElement(), function () local konto = getPlayerAccount(source) if ( konto ) then setAccountData (konto,"xxx",xxx[source]) end end ) But the above code doesn't work. In data base, 'xxx' has value 'nil'. And it 'xxx[source] doesn't load.
-
But when I have on my map sultan, and sultan id is 560, when I put this id, then in all cars (sultans) this function be work. 50p where are you from?
-
I want to do one car for police, but no policecar (eg police sultan) and only in this car can use key 'h'. I made function on key 'h' to flashing lights, and I want to put there "if car == id". Now you understand me? ;> I hope so
-
Hmm, here there is no such numbers, that the first vehicle is an id 1, second id 2, etc.
-
Hi, I have question. How can I do so: In function is condition eg: car = getPlayerOccupiedVehicle ( source ) if car == (id vehicle) then I try do this, but vehicle id is like this: 000000F6. When I do this, it doesn't work: car = getPlayerOccupiedVehicle ( source ) if car == "000000F6" then
-
This is the code fragmend. My all code: vehicleKierunek = { false } vehicleKierunekPrawy = { false } vehicleKierunekLewy = { false } function onPlayerJoin( ) bindKey ( source, "]", "down", KierunekPrawy ) bindKey ( source, "[", "down", KierunekLewy ) end function KierunekLewy(source) car = getPlayerOccupiedVehicle ( source ) if ( car ) then if not vehicleKierunekLewy[car] then vehicleKierunekPrawy[car]=false setVehicleLightState ( car, 1, 0 ) setVehicleLightState ( car, 2, 0 ) vehicleKierunekLewy[car]=true vehicleKierunek[car]=true else vehicleKierunekLewy[car]=false vehicleKierunek[car]=false setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 3, 0 ) end end end function KierunekPrawy(source) car = getPlayerOccupiedVehicle ( source ) if ( car ) then if not vehicleKierunekPrawy[car] then vehicleKierunekLewy[car]=false setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 3, 0 ) vehicleKierunekPrawy[car]=true vehicleKierunek[car]=true else vehicleKierunekPrawy[car]=false vehicleKierunek[car]=false setVehicleLightState ( car, 1, 0 ) setVehicleLightState ( car, 2, 0 ) end end end function Kierunek() if vehicleKierunekLewy[car] then if not vehicleKierunek[car] then setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 3, 0 ) vehicleKierunek[car]=true else setVehicleLightState ( car, 0, 1 ) setVehicleLightState ( car, 3, 1 ) vehicleKierunek[car]=false end elseif vehicleKierunekPrawy[car] then if not vehicleKierunek[car] then setVehicleLightState ( car, 1, 0 ) setVehicleLightState ( car, 2, 0 ) vehicleKierunek[car]=true else setVehicleLightState ( car, 1, 1 ) setVehicleLightState ( car, 2, 1 ) vehicleKierunek[car]=false end end end I try to do what you wrote. //Add Ok, thanks ;] It's working. Edit by varez: Same reason
-
Hi, I started to do turn signal (or direction indicator) in my gamemode. On top script I placed timer: setTimer(Kierunek,500,0) Below I placed function: function Kierunek() if vehicleKierunekLewy[car] then --direction indicator left if not vehicleKierunek[car] then setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 3, 0 ) vehicleKierunek[car]=true else setVehicleLightState ( car, 0, 1 ) setVehicleLightState ( car, 3, 1 ) vehicleKierunek[car]=false end elseif vehicleKierunekPrawy[car] then --direction indicator right if not vehicleKierunek[car] then setVehicleLightState ( car, 1, 0 ) setVehicleLightState ( car, 2, 0 ) vehicleKierunek[car]=true else setVehicleLightState ( car, 1, 1 ) setVehicleLightState ( car, 2, 1 ) vehicleKierunek[car]=false end end end How can I do loop (like 'for') order this function work for all cars? I hope you know what I mean. Thanks for reading. Edit by varez: Changed code tags to lua tags. Use them next time
-
Thanks very much ;> It's working
-
Hi everyone, I have problem. When I use function addAccount(username,password) in server log write: WARNING: RdxSerwer\login.serv.lua:32: Access denied @ 'addAccount' What can I do? I use this function to register new users (no admins). Thanks for reading
-
Ok thanks. For 5 minutes I clicked 'ok' and the window disappeared and there appeared the MTA ;> Now I must see it MTA works correctly. But each time when I run the MTA, this window are appears.
-
I don't have installed this. But when appeared window, in processes (CTRL + ALT + DEL) was gta_sa.exe process, when I close this process, window disappeared. Otherwise not possible to close the window
-
Hello everyone. Yesterday I've downloaded MTA 1.0.4, and I have a problem. When trying to run the MTA appears this window: How can I fix this? I have this problem with 1.0.3 too, when trying to run MTA 1.0.2 or 1.0.1 everything is ok. Thanks for your help.