-
Posts
103 -
Joined
-
Last visited
-
Days Won
2
Everything posted by ahmedo01
-
I want to add to table if not exists else update but i dont know how to do it. I tried this. function addItem(plr,cmd,accountname,itemname,friendlyname,amount,itemtype) if plr and cmd and accountname and itemname and friendlyname and itemtype then dbExec( con, "IF EXISTS(SELECT * FROM envanter WHERE accountname='?' AND itemname='?') THEN UPDATE envanter SET amount='1' WHERE accountname='?' AND itemname='?' ELSE INSERT INTO envanter (id,accountname,itemname,friendlyname,amount,itemtype) VALUES(NULL,'1','1','1','1','1'",accountname,itemname,accountname,itemname) end end addCommandHandler("additem",addItem) Connection working I did it for testing.
-
BUMP, I cant find it. I tried glitchs.
-
How can i do this? I see in youtube video. Here is a image. I tried setPlayerDoingGangDriveBy but not worked. When ped doing a animation is there a way to shoot? Thanks
-
lol, i didnt asking this, my friend asks this. i havent got any server thanks for answers. /lock
-
okey then is there a way to only change online players count?
-
How can i do this Here is a server witb 10 online and i want to add 20 players showing. Like Bot1 Bot2 in server online players list. How can i do it?
-
Nice job.
-
Hello All, First i have a problem A gui with editbox. When you put a code in textbox and ok button, it trivtriggers event and removes this code in xml and starts vip. today+30 days when it will be end but how? ex tried getRealTime ().yearday + 30 but if the date > 335 it gives error because for ex if date = 350 then 350+30 = 380 and it bugged
-
Hello All, I am working on a new system but i need this. server code: function getPunishments(player) local playeraccount = getPlayerAccount( player ) local accname = getAccountName( playeraccount ) local mypunishments = mysql_query ( db, "SELECT * FROM `punishments` WHERE `accountname` = '"..accname.."'" ) local result,row = mysql_rows(mypunishments) local set = setElementData(player,"CGC.punishmentsdata",toJSON(row)) end addEvent("CGC.getPunishments",true) addEventHandler( "CGC.getPunishments", getRootElement( ), getPunishments) here is client side: local row = getElementData(getLocalPlayer( ),"CGC.punishmentsdata") and for row1 in fromJSON(row) do outputChatBox(row1[1]..row1[2]) end but don't working.I want get informations from database to client side but how? It gives error in debugscript couldn't convert userdata argument to JSON, only valid resources can be included for this function.
-
Hey, I am working on admin system. But there is an error. How can i do this: Admin select a player. Admin gets live stream from player screen. Can it be? Sorry for my bad english.
-
i know. but i cant fix.
-
i used already but it gives error.
-
Use screen in linux.
-
addEventHandler( "onClientPlayerQuit", getRootElement(), function( reason ) local account = getPlayerAccount( source ) local money = getPlayerMoney( source ) local occupation = getElementData( source, "Occupation") local team = getPlayerTeam( source ) local teamname = getTeamName( team ) local x,y,z = getElementPosition( source ) local dimension = getElementDimension( source ) local interior = getElementInterior( source ) local skin = getElementModel( source ) local accountname = getAccountName( account ) if money and occupation and team and x and y and z and dimension and interior and skin and teamname then local savelocation = mysql_query(moduledb, "UPDATE 'playerlocations' SET x = '"..x.."', y = '"..y.."', z = '"..z.."' WHERE accountname = '"..accountname.."'") local saveothers = mysql_query(moduledb, "UPDATE 'playerinfo' SET money = '"..money.."', occupation = '"..occupation.."', team = '"..teamname.."', dimension = '"..dimension.."', interior = '"..interior.."', skin = '"..skin.."' WHERE accountname = '"..accountname.."'") --mysql_free_result(savelocation) --mysql_free_result(saveothers) else outputChatBox("Error! Cannot save informations!") end end ) don't update. i am using mta_mysql module
-
i need help waiting... bump.
-
function saveonlogout(prevA) local player = getAccountPlayer(prevA) local money = getPlayerMoney( source ) local occupation = getElementData( source, "Occupation") local team = getPlayerTeam( source ) local teamname = getTeamName( team ) local x,y,z = getElementPosition( source ) local dimension = getElementDimension( source ) local interior = getElementInterior( source ) local skin = getElementModel( source ) local account = getPlayerAccount( source ) local accountname = getAccountName( account ) outputChatBox("You are logged out") if money and occupation and team and x and y and z and dimension and interior and skin and teamname then local savelocation = mysql_query(moduledb, "UPDATE 'playerlocations' SET x = '"..x.."', y = '"..y.."', z = '"..z.."' WHERE accountname = '"..accountname.."'") local saveothers = mysql_query(moduledb, "UPDATE 'playerinfo' SET money = '"..money.."', occupation = '"..occupation.."', team = '"..teamname.."', dimension = '"..dimension.."', interior = '"..interior.."', skin = '"..skin.."' WHERE accountname = '"..accountname.."'") --mysql_free_result(savelocation) --mysql_free_result(saveothers) else outputChatBox("Error! Cannot save informations!") end end addEventHandler("onPlayerLogout",getRootElement(),saveonlogout) i cant get source source gives boolean why?
-
i have a question. dbExec( conn, "SELECT spawnername FROM `ogren` . `spawners`") i can select spawnername from table but how i can get spawnername?
-
thanks Et-win i am fixed it. i am converting to mysql.
-
i asking why not save xml
-
i know but this not saves xml file. i have xml file but not add child. <spawner> </spawner> only this
-
:110 Bad argument @ 'xmlNodeGetAttribute' [Expected xml-node at argument 1] :111 Bad argument @ 'outputDebugString' got boolean at argument 1