
DexoTronic
Members-
Posts
42 -
Joined
-
Last visited
Everything posted by DexoTronic
-
Hi, i create a vehicle with truck = createvehicle (..). now in OnPlayerEnterVehicle i want to check if player enters the "truck". is it possible in mta? in the wiki it can only make a diffenrence between the vehicle ids. i didnt find a example in the net. please help me
-
thanks, worked. you have icq or msn?
-
Hi, i have this code: function createPlayerList () Verkauffenster = guiCreateWindow(406,259,458,565,"",false) Label = guiCreateLabel(15,31,418,87,"FortCarson Autohaus",false,Verkauffenster ) guiLabelSetColor(Label ,255,120,0) guiLabelSetVerticalAlign(Label ,"top") guiLabelSetHorizontalAlign(Label ,"left",false) guiSetFont(Label ,"sa-header") VorschauBild = guiCreateStaticImage(239,126,173,170,"images/taxi.jpg",false,Verkauffenster ) KaufenBtn = guiCreateButton(18,510,431,46,"Kaufen",false,Verkauffenster ) SchliessenBtn = guiCreateButton(405,27,44,46,"X",false,Verkauffenster ) VorschauBtn = guiCreateButton(240,306,174,38,"Vorschau",false,Verkauffenster ) Liste = guiCreateGridList(14,125,214,379,false,Verkauffenster ) guiGridListSetSelectionMode(Liste,2) column = guiGridListAddColumn(Liste,"Fahrzeug",1.0) Fahrzeug1 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug1 , column, "Sabre", false, false ) Fahrzeug2 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug2 , column, "Sabre1", false, false ) Fahrzeug3 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug3 , column, "Sabre2", false, false ) Fahrzeug4 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug4 , column, "Sabre3", false, false ) Fahrzeug5 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug5 , column, "Sabre4", false, false ) Fahrzeug6 = guiGridListAddRow(Liste) guiGridListSetItemText ( Liste, Fahrzeug6 , column, "Sabre5", false, false ) addEventHandler ( "onClientGUIClick", playerList, click ) end addEventHandler ( "onClientResourceStart", getRootElement(), createPlayerList ) function click () local item = guiGridListGetItemText ( Liste , guiGridListGetSelectedItem ( Liste ), 1 ) outputChatBox ( item ) end but if i click one of the items, it doenst send a text message whats wrong where?
-
yes but that works with vehicleIDs only.. i want to make it work with the variable i have given to the vehicle
-
worked... i love you man another question, i dont want to spam the board with new threads ^^ : i create a vehicle with truck1 = createvehicle(...) is there a way to detect if player enters the "truck1" ? and throw him out of the vehicle if PlayerJob[client] isnt = 2 ?
-
1. function onClickBtn ( button, state ) if (button == "left" and state == "up") then if (source == TruckAnnehmenBtn ) then guiSetInputEnabled(false) guiSetVisible ( TruckWindow , false ) showCursor ( false ) triggerServerEvent ( "truckerannehmen", getRootElement()) end if (source == TruckAblehnen ) then guiSetInputEnabled(false) guiSetVisible ( TruckWindow , false ) showCursor ( false ) end end end account[source] = getPlayerAccount ( source ) the trigger works, it changes the skin on btn click but it doesnt save after i quit
-
Hello, its me again^^ My Problem is: function truckerannehmen_func ( ) setPedSkin ( source, 34 ) PlayerJob[source] = tonumber(2) end addEvent ( "truckerannehmen", true ) addEventHandler ( "truckerannehmen", getRootElement(), truckerannehmen_func ) After the Player accepts a Job, his skin will change and PlayerJob[source] will be set to "2". But it doesnt work. I have this code on playerquit: setAccountData ( account[source], "Job", PlayerJob[source] ) PlayerJob[source] = nil But after the player quits, in the account data is still written "1" for job it should be "2" now. I dont get any errors, but what is wrong?
-
Hi, i have this clientside script: intro1 = guiCreateLabel(446,927,834,79,"NextGeneration Team presents...",false) guiSetAlpha(intro1,1) guiLabelSetColor(intro1,255,120,0) guiLabelSetVerticalAlign(intro1,"top") guiLabelSetHorizontalAlign(intro1,"left",false) guiSetFont(intro1,"sa-gothic") guiSetVisible ( intro1 , false ) intro2 = guiCreateLabel(446,927,834,79,"MultiTheft Roleplay",false) guiSetAlpha(intro2,1) guiLabelSetColor(intro2,255,120,0) guiLabelSetVerticalAlign(intro2,"top") guiLabelSetHorizontalAlign(intro2,"left",false) guiSetFont(intro2,"sa-gothic") guiSetVisible ( intro2 , false ) function intro1_func () setTimer ( guiSetVisible , 4000, 1, intro1 , false) guiSetVisible ( intro1 , true ) end addEvent ( "intro1", true ) addEventHandler ( "intro1", getRootElement(), intro_func ) function intro2_func () setTimer ( guiSetVisible , 4000, 1, intro2 , false) guiSetVisible ( intro2 , true ) end addEvent ( "intro2", true ) addEventHandler ( "intro2", getRootElement(), intro_func ) and this server script: fadeCamera ( source, false, 10.0, 0, 0, 0 ) setTimer ( outputChatBox, 1000, 1, "Pilot: Mayday, over", source) setTimer ( outputChatBox, 2000, 1, "Pilot: Hier ist Flug MOSQ536, over", source) setTimer ( outputChatBox, 3000, 1, "Pilot: wir stürzen ab", source) setTimer ( outputChatBox, 4000, 1, "Pilot: ahhhrrghhh", source) setTimer ( triggerClientEvent , 4000, 1, source, "intro1", getRootElement()) setCameraMatrix(source, -204.76, 1492.3, 72.4, -225.31, 1395.92, 162.74) setTimer ( fadeCamera, 10000, 1, source, true, 0.5 ) setTimer ( triggerClientEvent , 10000, 1, source, "intro2", getRootElement()) setTimer ( setCameraMatrix, 10000, 1, source, -233.12, 1331.17, 37.7, -234.78, 1313.88, 31.74 ) setTimer ( giveWeapon , 15000, 1, source, 46, 1) setTimer ( spawnPlayer, 15000, 1, source, -231.72, 1302.4, 29.34 ) PlayerLogins[source] = PlayerLogins[source] + 1 triggerClientEvent ( source, "planecrash", getRootElement()) setTimer ( triggerClientEvent , 12000, 1, source, "phonesound", getRootElement()) setTimer ( setCameraTarget, 15000, 1, source, source) setTimer ( setPedAnimation, 15000, 1, source, "ped", "phone_in", -1, false) setTimer ( setPedAnimation, 17000, 1, source, "ped", "phone_talk", -1, false) setTimer ( outputChatBox, 17000, 1, "Du(Handy): Er ist Tod..", source) setTimer ( outputChatBox, 19000, 1, "Michael Hunter(Handy): Gut, das Geld ist auf deinem Bankkonto.", source) setTimer ( setPedAnimation, 20000, 1, source, "ped", "phone_out", 3000, false) setTimer ( triggerClientEvent , 20000, 1, source, "maintitle", getRootElement()) like you can see i try to call the clientfunktion in line 6&9. but nothing happens it shoud display the two labels (there is no window, only the labels) i hope you can help me **EDIT: im rly sorry, there is a mistake in the client function: it has to be intro1/2_func, i forgot that.. solved
-
Hey i have a problem: i want the player to take out a phone. but you cant use animations in mta, only for PEDs. is there a way to animate the player? EDIT** solved you only have to use the command for PED for the player
-
hmm jason, haste icq ?
-
no i havent, how to declare it? account = {}; ?
-
Okay I had PlayerLogins = { } now i have PlayerLogins = { }; the error is gone, but now the error is "attempt to compare string with number" EDIT: Here the Code again: function displayLoadedRes ( res ) account = {}; PlayerLogins = {}; PlayerMoney = {}; PlayerSkillPoints = {}; PlayerLevel = {}; PlayerFraction = {}; PlayerJob = {}; PlayerBankMoney = {}; PlayerHausnummer = {}; PlayerAdminlevel = {}; PlayerSkin = {}; PlayerCarID = {}; PlayerCarx = {}; PlayerCary = {}; PlayerCarz = {}; PlayerCarrx = {}; PlayerCarry= {}; PlayerCarrz = {}; end addEventHandler ( "onResourceStart", getRootElement(), displayLoadedRes ) function OnLogin (prevA, curA, autoLogin) account[source] = getPlayerAccount ( source ) PlayerLogins[source] = getAccountData ( account[source], "Logins" ) PlayerMoney[source] = getAccountData ( account[source], "Money" ) PlayerSkillPoints[source] = getAccountData ( account[source], "SkillPoints" ) PlayerLevel[source] = getAccountData ( account[source], "Level" ) PlayerFraction[source] = getAccountData ( account[source], "Fraction" ) PlayerJob[source] = getAccountData ( account[source], "Job" ) PlayerBankMoney[source] = getAccountData ( account[source], "BankMoney" ) PlayerHausnummer[source] = getAccountData ( account[source], "Hausnummer" ) PlayerAdminlevel[source] = getAccountData ( account[source], "Adminlevel" ) PlayerSkin[source] = getAccountData ( account[source], "Skin" ) PlayerCarID[source] = getAccountData ( account[source], "CarID" ) PlayerCarx[source] = getAccountData ( account[source], "Carx" ) PlayerCary[source] = getAccountData ( account[source], "Cary" ) PlayerCarz[source] = getAccountData ( account[source], "Carz" ) PlayerCarrx[source] = getAccountData ( account[source], "Carrx" ) PlayerCarry[source] = getAccountData ( account[source], "Carry" ) PlayerCarrz[source] = getAccountData ( account[source], "Carrz" ) outputChatBox ("Willkommen bei Next Generation!", source, 255, 0, 0, false) if (PlayerLogins[source] < 2) then setCameraMatrix(source, -233.12, 1331.17, 37.7, -234.78, 1313.88, 31.74) PlayerLogins[source] = PlayerLogins[source] + 1 setAccountData ( account[source], "Logins", PlayerLogins[source] ) elseif (PlayerHausnummer[source] == 1) then spawnPlayer(source, -176.91, 1110.9, 19.74, 90) PlayerLogins[source] = PlayerLogins[source] + 1 setAccountData ( account[source], "Logins", PlayerLogins[source] ) fadeCamera(source, true) setCameraTarget(source, source) end end addEventHandler("onPlayerLogin", getRootElement(), OnLogin)
-
Hello, i have an Problem. First of all my code: function OnLogin (prevA, curA, autoLogin) account = getPlayerAccount ( source ) PlayerLogins[source] = getAccountData ( account, "Logins" ) PlayerMoney[source] = getAccountData ( account, "Money" ) PlayerSkillPoints[source] = getAccountData ( account, "SkillPoints" ) PlayerLevel[source] = getAccountData ( account, "Level" ) PlayerFraction[source] = getAccountData ( account, "Fraction" ) PlayerJob[source] = getAccountData ( account, "Job" ) PlayerBankMoney[source] = getAccountData ( account, "BankMoney" ) PlayerHausnummer[source] = getAccountData ( account, "Hausnummer" ) PlayerAdminlevel[source] = getAccountData ( account, "Adminlevel" ) PlayerSkin[source] = getAccountData ( account, "Skin" ) PlayerCarID[source] = getAccountData ( account, "CarID" ) PlayerCarx[source] = getAccountData ( account, "Carx" ) PlayerCary[source] = getAccountData ( account, "Cary" ) PlayerCarz[source] = getAccountData ( account, "Carz" ) PlayerCarrx[source] = getAccountData ( account, "Carrx" ) PlayerCarry[source] = getAccountData ( account, "Carry" ) PlayerCarrz[source] = getAccountData ( account, "Carrz" ) outputChatBox ("Willkommen bei Next Generation!", source, 255, 0, 0, false) if (PlayerLogins[source] < 2) then setCameraMatrix(source, -233.12, 1331.17, 37.7, -234.78, 1313.88, 31.74) PlayerLogins[source] = PlayerLogins[source] + 1 setAccountData ( account, "Logins", PlayerLogins[source] ) elseif (PlayerHausnummer[source] == 1) then spawnPlayer(source, -176.91, 1110.9, 19.74, 90) PlayerLogins[source] = PlayerLogins[source] + 1 setAccountData ( account, "Logins", PlayerLogins[source] ) fadeCamera(source, true) setCameraTarget(source, source) end end addEventHandler("onPlayerLogin", getRootElement(), OnLogin) after i login, the server say me an error at the line "if(PlayerLogins[source] < 2)then" it say the PlayerLogins is a "nil" -.- So thats the Accountfile: i hope you can help me... mta is so complicated im just before to give it up
-
function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then account = getAccount ( user, pass ) PlayerMoney[source] = getAccountData ( account[source], "Money" ) PlayerSkillPoints[source] = getAccountData ( account[source], "SkillPoints" ) PlayerLevel[source] = getAccountData ( account[source], "Level" ) PlayerFraction[source] = getAccountData ( account[source], "Fraction" ) PlayerJob[source] = getAccountData ( account[source], "Job" ) PlayerBankMoney[source] = getAccountData ( account[source], "BankMoney" ) PlayerHausnummer[source] = getAccountData ( account[source], "Hausnummer" ) PlayerAdminlevel[source] = getAccountData ( account[source], "Adminlevel" ) PlayerSkin[source] = getAccountData ( account[source], "Skin" ) PlayerCarID[source] = getAccountData ( account[source], "CarID" ) PlayerCarx[source] = getAccountData ( account[source], "Carx" ) PlayerCary[source] = getAccountData ( account[source], "Cary" ) PlayerCarz[source] = getAccountData ( account[source], "Carz" ) PlayerCarrx[source] = getAccountData ( account[source], "Carrx" ) PlayerCarry[source] = getAccountData ( account[source], "Carry" ) PlayerCarrz[source] = getAccountData ( account[source], "Carrz" ) else outputChatBox ( "Loginfehler!", player, 255, 255, 0 ) end else outputChatBox ( "Du besitzt noch keinen Account. Registriere dich bitte zuerst.", player, 255, 255, 0 ) end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) so thats my code (+ the onquit) now i love you guys
-
robhol, could you please invite me (give username + pass) i rly have to read those tutorials, please. it would be very nice if you give me an account for your page Best regard, DexoTronic
-
Hello. I have saved the PlayerMoney in a Variable in the Accounts.xml. So i can load it: account = getPlayerAccount ( source ) PlayerMoney = getAccountData ( account, "Money" ) It works. But 1 Problem: for example, i have 650$ in my account saved, after i login the varibale PlayerMoney is 650$. But if somebody else loggs in, who has 800$ saved the variable has 800$ Is there a way to aviod that? Like: PlayerMoney[source] ? (i tried that, doesnt work) sry 4 my english i hope you help me.