SDK
Members-
Posts
635 -
Joined
-
Last visited
Everything posted by SDK
-
It looks like you got most lines from here, but you're mixing server and client up. meta.xml ... <script src="login_s.lua" type="server" /> <script src="login_c.lua" type="client" /> ... login_s.lua (server): function loginHandler(username,password) handler = mysql_connect(".......", ".....", "......", ".....") if ( not handler ) then outputChatBox("Unable to connect to the MySQL server") else outputChatBox("Able to connect to the MySQL server") mysql_close(handler) end if username == "g" and password == "a" then if (source) then outputChatBox("Logged in successfully",source) spawnPlayer(source, 1959.55, -1714.46, 10) fadeCamera(source, true) setCameraTarget(source) end else outputChatBox("Invalid username and password. Please re-connect and try again.",source) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) login_c.lua (client) : ... -- your code when clicking the button triggerServerEvent ("submitLogin", getLocalPlayer(),username,password) ... (These files are only an example, you can use your own names and folders)
-
Probably not, the error happens before those functions. But you still need to keep them clientside (all GUI stuff). Is everything correct in the meta.xml?
-
Quick question, is it even possible to detect when a hunter shoots a vehicle? Afaik, it wasn't? And a small error: the outputChatBox's are wrong, you're adding exp after you already set the account data.
-
"Doesn't work" .. Try being more specific, any errors in debug? Edit: There's a ( to much on line 3 in createVehicle, and your license plate should be a string!
-
Use debugging... Line 8 needs more parameters. addEventHandler ( "onClientResourceStart", getResourceRootElement(), attach ) Line 11, "attach" is a function, correct element is "Marker". if isElementWithinMarker ( player, Marker) then
-
Send ccw a pm about the problem
-
This may sound silly, but could you try to change the first line in your map file to this: <map edf:definitions="race,editor_main"> (For the ones interested, I think these lines 272-278 in race_server.lua cause the problem ) I haven't tried this myself, but I had the same problem as you once. It happened after I edited the map manually a bit.
-
Only it doesn't work that way, it uses the checkpoint split times to compare. So, it's not possible to modify the progress bar for your needs.
-
1) https://wiki.multitheftauto.com/wiki/Resource:Race -> Events You probably need onPollStarting or onRaceStateChanging 2) https://wiki.multitheftauto.com/wiki/OnPlayerChat Read Cancel effect Good luck
-
ok i have a question, if u dont share it why u say u made it?. in my opinion is kinda useless He explained roughly how he did it tho. In my opinion that's usefull
-
Why would you want a 1 millisecond respawn? Since setTimer's lowest interval is 50ms, I guess it's the pickups lowest interval as well and that should be low enough.
-
Looks nice, I would love to try it out when it's released
-
I think I saw another thing at line 24 mta.text %advermsg %advermsg = %advertmsg ?
-
This is how I would do it: on *:SIGNAL:mta.command: { if ($3 == !advert) { if ($mta.level($1,$2) = 5) { if ($4 == $null) mta.pm $1 $2 Error - Set an advert-Message else { mta.text $1 Advert $iif(!timer(mta.advert),changed,added) .timermta.advert 0 60 mta.text $1 $4- } } else mta.pm $1 $2 Error - You need to be level 5 to use this command } elseif ($3 == !stopadvert) { if ($mta.level($1,$2) = 5) { if ($timer(mta.advert)) { .timermta.advert off mta.text $1 Advert stopped } else mta.pm $1 $2 Error - No advert found } else mta.pm $1 $2 Error - You need to be level 5 to use this command } } I would prefer mine cause you are using a variable, your timer would never stop and your using a signal And you forgot your $1 at line 24
-
Does $mta.dead returns the number off all dead players? Edit: And I guess you mean $mta.server ...
-
$mta.dead returns "1" if a player is dead, else it returns nothing: on *:SIGNAL:mta.part: { if ($mta.dead($1,$2) != 1) set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } Sanzor, if you can't script, then don't post ...
-
Thats mta.adcon on *:SIGNAL:mta.adcon:{ if ($1 == %echoserverid) /msg #CHANNEL $mta.nick($1,$2) $+ : $3- } Just look here
-
I wrote something: on *:signal:mta.join:{ if ($1 != 1) mta.text 1 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has joined the game if ($1 != 2) mta.text 2 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has joined the game if ($1 != 3) mta.text 3 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has joined the game if ($1 != 4) mta.text 4 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has joined the game } on *:signal:mta.part:{ if ($1 != 1) mta.text 1 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has left the game (Reason: $iif($3 == 1,Kicked,$iif($3 == 2,Banned,Exit)) $+ ) if ($1 != 2) mta.text 2 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has left the game (Reason: $iif($3 == 1,Kicked,$iif($3 == 2,Banned,Exit)) $+ ) if ($1 != 3) mta.text 3 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has left the game (Reason: $iif($3 == 1,Kicked,$iif($3 == 2,Banned,Exit)) $+ ) if ($1 != 4) mta.text 4 <sAkina # $+ $1 $+ > $mta.nick($1,$2) has left the game (Reason: $iif($3 == 1,Kicked,$iif($3 == 2,Banned,Exit)) $+ ) } on *:signal:mta.text:{ if ($1 != 1) mta.text 1 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 2) mta.text 2 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 3) mta.text 3 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 4) mta.text 4 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- } on *:signal:mta.command:{ if ($1 != 1) mta.text 1 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 2) mta.text 2 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 3) mta.text 3 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- if ($1 != 4) mta.text 4 <sAkina # $+ $1 $+ >< $+ $mta.nick($1,$2) $+ > $$3- } Didn't test it, so let me know if it doesn't work
-
You forgot the { brackets after the else on *:SIGNAL:mta.text: { if ($3 == brb) { if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { mta.pm $1 $2 Your status are already set to "Be right back!" } else { mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-) mta.pm $1 $2 Your status have been set to "Be right back!" !writeini -n " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) BRB } } elseif ($3 == back) { if (!$readini($scriptdir $+ status.ini,players,$mta.nick($1,$2))) { mta.pm $1 $2 Your status are not set to "Away!" } else { mta.text $1 $mta.nick($1,$2) is back, and better then ever! mta.pm $1 $2 Your status have been reset to normal. !remini " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) } } }
-
you can't choose them but you can do "/me " for purple text
-
i think it's somewhere at the farm objects
-
You didn't have free aim when you were driving a car in SP, and now you can do it in DM. Maybe its possible?
