-
Posts
749 -
Joined
-
Last visited
-
Days Won
1
Everything posted by FlyingSpoon
-
function createFlagMarker(x, y, z, r, g, b) if x and y and z then if not r or not g or not b then r, g, b = 255, 255, 255 end local one = createMarker(x, y, z, "cylinder", 1.5, r, g, b) end end addEvent("createFlagMarker", true) addEventHandler("createFlagMarker", root, createFlagMarker) function createFlag(id, x, y, z, rx, ry, rz) local two = createObject ( id, x, y, z, rx, ry, rz ) end addEvent("createFlag", true) addEventHandler("createFlag", root, createFlag) function getFlags(thePlayer) if (thePlayer == one) then outputChatBox("works") else outputChatBox("dont work") end end addEventHandler("onMarkerHit", getRootElement(), getFlags) It keeps outputting dont work
-
Thanks, Now it creates multiple markers on the server side function startTheMap() exports.ctfSys:createFlagMarker(583.61676, -3545.85083, 14.31875, 255, 0, 0) exports.ctfSys:createFlag(2993, 583.61676, -3545.85083, 15.31875) end addEventHandler("onResourceStart", root, startTheMap)
-
Can you help me D: I am really stuck.. I never used export functions before.
-
I am trying to create exports.. I am failing D: My resource is called 'ctfSys' I am trying to create exports to trigger on the Client Side - SERVER SIDED function createFlagMarker(x, y, z, r, g, b) createMarker(x, y, z, "cylinder", 2, r, g, b) end addEvent("createFlagMarker", true) addEventHandler("createFlagMarker", root, createFlagMarker) function createFlag(x, y, z, rx, ry, rz) createObject ( x, y, z, rx, ry, rz ) end addEvent("createFlag", true) addEventHandler("createFlag", root, createFlag) META.XML CLIENT SIDE exports.ctfSys:createFlagMarker(2003.61475, 1543.82678, 13.59075)
-
Buy it or *cough* hehehe
-
Thanks @Cnosi I love your dedication to help me. @Luka Havrlisan is there any way I can make these flags?
-
Well I saw it in SA-MP.. in their editor.. How can I get these objects? Or create them in MTA:SA? I saw many servers with these custom objects.
-
I meant... how can I create one. My own mod. ;D
-
I am trying to create custom object. Because I am working on a custom CTF Script. I want a Red Flag and a Blue Flag.. How can I do this? Custom object?
-
Ahhh... I guess I learnt something new. Thanks @Mr.Moose.
-
function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",resourceRoot,setDeathSpawn)
-
Well about Valhalla... If it was leaked it had no copyrights on the script soon it is open source as of now.
-
+1 Noki I know right.. even if you cant make one from scratch.. Just base it off Valhalla or something like most servers have done.. And if you cant get your lazy a** to script either hire a scripter simple
-
+1 ..: D&G :.. my bro <3
-
It is quite sad... Many small roleplay servers are still out there which are really great and better than Owl or any other server. But no one, I mean no one.. really wants to look at them just because of their player base. If you take a look at them in your free time I guess, you might find one Good luck.
-
Nvm.. works <3 ty
-
Didnt work... It just keeps outputting Fuel pump successfully deleted even if I just write ./delpump it just keeps outputting that message
-
function pump_rem ( p, cmd ) if ( exports.global:isPlayerAdvancedSupervisor(p) ) then if not cmd then outputChatBox("SYNTAX: /"..cmd.." [id]", p) else local query_two = mysql:query ( "DELETE FROM fuelpumps WHERE id='"..id.."'") if query_two then outputChatBox("Fuel pump successfully deleted.", p, 0, 255, 0) end end end end addCommandHandler("delpump", pump_rem) Well Idk what I have done, but people createPump, and then it inserts to MySQL with certain ID's. But I want to now make a command so people can delete them certain ID's.. how would I do it? e.g. If person create's pump with ID 1 in MySQL Database, but after want to delete it they do - ./delpump 1 How would I do this please, help!
-
What messages are outputted.
-
Okay after finding more online resources, and other people's previous fixes.. I nearly got it working.. Now all it does it just keeps creating the same account over and over.. So.. how can I prevent this? function registrationHandler(username,password) handler = mysql_connect("localhost", "root", "", "roleplay") local row = mysql_query(handler, "SELECT * FROM accounts WHERE username=`"..username.."`") if row then outputDebugString("Username already exists") triggerClientEvent(client, "displayLogin", getRootElement()) return end local result = mysql_query(handler, "INSERT INTO accounts (username, password) VALUES ('"..username.."', '"..password.."')") if not result then outputDebugString("Registration failed. "..mysql_error(handler)) triggerClientEvent(client, "displayLogin", getRootElement()) return end triggerClientEvent(client, "displayLogin", getRootElement()) outputChatBox("Registration successful!", client, 0, 255, 0) end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",root,registrationHandler)
-
function registerPlayer(username,password) handler = mysql_connect( host, username, password, db ) if not (username == "") then if not (password == "") then local account = getAccount (username,password) if (account == false) then local accountAdded = mysql_query(handler,"INSERT INTO accounts VALUES "(tostring(username),tostring(password))"';") if (accountAdded) then outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) triggerClientEvent(source,"achievement:onRegister", getRootElement()) else outputChatBox("An error occured! Please choose a different username/or password!", source, 255, 0, 0) end else outputChatBox("An account with this username already exists!", source, 255, 0, 0) end else outputChatBox("Null!", source, 255, 0, 0) end else outputChatBox("Null!", source, 255, 0, 0) end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) I am really stuck, I dont even know what's going on, please someone help me out! Thanks [2015-08-12 12:57:49] SCRIPT ERROR: login\s_login.lua:7: ')' expected near '(' [2015-08-12 12:57:49] ERROR: Loading script failed: login\s_login.lua:7: ')' expected near '('
-
Thanks! You saved my day
-
Using basic roleplay gamemode of vG for private purposes and non-public. I am trying to make this script from scratch but I am having problems. SERVER SIDED local mysql = exports.mysql function saveFunc(xPosition, yPosition, zPosition, rotPosition, nameLocation, descriptionLocation) local insertid = mysql:query_insert_free("INSERT INTO locations SET x='" .. mysql:escape_string(tonumber(xPosition)) .. "', y='" .. mysql:escape_string(tonumber(yPosition)) .. "', z='" .. mysql:escape_string(tonumber(zPosition)) .. "', rot='" .. mysql:escape_string(tonumber(rotPosition)) .. "', name='" .. mysql:escape_string(nameLocation) .."', description='" .. mysql:escape_string(descriptionLocation) ) if (insertid) then outputChatBox("Location:"..nameLocation.. "has successfully been saved!", source, 0, 255, 0) else outputChatBox("An error occured! Please contact an Administrator!", source, 255, 0, 0) end end addEvent("saveFunc:saveLocation", true) addEventHandler("saveFunc:saveLocation", root, saveFunc) [2015-08-07 22:59:49] INFO: MYSQL ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\n' at line 1 -- Near description
-
Huh...