-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
209
Everything posted by IIYAMA
-
setPedAnimation(source,false) 2 seconds is 2000 ms not 5000 ms.
-
What do you mean with nothing? You are the one who needs to debugging it, show me the debug results. and it is stupid to use the same debug text all over the script, you need to write what happens there. Not just copy my text, so you don't know what part of the code get executed. Don't forget the /debugscript 3
-
https://wiki.multitheftauto.com/wiki/On ... eCollision
-
You have to use outputDebugString the same as outputChatBox, does nothing else then outputChatBox in to your debug. These debug logs are meant for you, so you can see what is going on. addEvent("afkStatus",true) addEventHandler("afkStatus",root, function (status) outputDebugString("serverside part executed") if status then setPlayerName (client,getPlayerName(client).. "|AFK") outputDebugString("set to afk") else local name = string.gsub(getPlayerName(client),"|AFK", "") if name then outputDebugString("set to not afk") setPlayerName (client,name) end end end) Sorry I do not have notepad ++ on my mac...... so no tabs.
-
yes, if the resource which this xml file is in uses the exact same name.
-
you copied it too fast, I made a typo. outputDebugString Add it at every part of the code you aren't sure it does get executed.(like server side for example)
-
add some manually debug inside your code: outputDebugString("write here which part of the code get executed") Also make sure your name isn't too long. ( Maximum player name length is 22 characters. )
-
Try this: Serverside addEvent("afkStatus",true) addEventHandler("afkStatus",root, function (status) if status then setPlayerName (client,getPlayerName(client).. "|AFK") else local name = string.gsub(getPlayerName(client),"|AFK", "") if name then setPlayerName (client,name) end end end) Set afk triggerServerEvent("afkStatus",localPlayer,true) Set not afk. triggerServerEvent("afkStatus",localPlayer,false)
-
See syntax of clientside outputChatBox and serverside outputChatBox, then you know what you are doing wrong. Server bool outputChatBox ( string text [, element visibleTo=getRootElement(), int r=231, int g=217, int b=176, bool colorCoded=false ] ) Client bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) Clientside doesn't need a target to send it too, since it happens on the client his pc.
-
The file is clientside, the code you are using is not. Post it again if you followed my instructions.
-
Please convert you code to clientside, follow the instructions of my post before.
-
clientside addCommandHandler has a differed syntax: Serverside: player playerSource, string commandName, [string arg1, string arg2, ...] Clientside: string commandName, [string arg1, string arg2, ...] Use at clientside localPlayer instead. (DON'T DEFINE localPlayer INSIDE THE FUNCTION)
-
WRONG SECTION and WRONG SECTION CLICK HERE (resources) CLICK HERE (paid scripter) What CAN you post on this section?????
-
When I am talking about a cookie I am not talking about html and shit. I am talking about something similar to that in mta: creating a clientside xml file, which contains a personal code. A code which another pc can't fake. If the code or serial doesn't match with the account, you have to re-login again. Timestamp is for extra security, so after a while the player has to re-login again.
-
I never mentioned the serverside functions: "onPlayerSpawn" "onPlayerQuit" "onPlayerWasted" You are going to create the blips clientside. and I forgot the event: "onClientPlayerQuit" --> remove blip and save the blips like this: playerBlibs[player]= blip get the blips like this: local blip = playerBlibs[player] clear the data from the table like this: playerBlibs[player] = nil
-
clientside local playerBlibs = {} -- events -- "onClientPlayerSpawn" --> attach blip "onClientPlayerWasted" --> remove blip "onClientElementDataChange" --> attach blip/remove blip "onClientResourceStart" --> (use resourceRoot instead of root) loop through players: attach blips serverside -- events -- "onResourceStart" --> (use resourceRoot instead of root) loop through players: set the elementdata to false for all players. So onClientElementDataChange event will work in the beginning.
-
you aren't debugging your code, if you did you want see that the variable blip is nil. You also would see that the: if not gangname then : part never get executed unless the localPlayer has no element data as well.
-
if not gangname then
-
saving the serial + cookie + timestamp - Serial for checking who he is. - Cookie and timestamp for security.
-
I didn't say he needed to trigger the root. Only in the code he posted here, it will only accept the resourceRoot now.
-
how far are you from the boundary ? Because after an amount of units this happens.
-
and try to use root instead of resourceRoot. I didn't saw that until now.
-
jup, somebody can. Somebody who likes to steal content of it.
-
function giveMinigun() giveWeapon ( client, 38, 5000 ) takePlayerMoney ( client, 15000 ) end addEvent ( "giveMinigun", true ) addEventHandler ( "giveMinigun", resourceRoot, giveMinigun )
-
outputChatBox(math.ceil(2.45645)) -- 3 outputChatBox(math.floor(2.45645)) -- 2 local groups = mapsleft/15 --[[ example value 97 97 / 15 = 6.4666666666667 math.ceil(6.4666666666667) -- 7 math.floor(6.4666666666667) -- 6 ]] local maxGroups = math.ceil(groups) -- groups rounded up. local minGroups = math.floor(groups) -- groups rounded down. local remainValue = mapsleft % 15 --[[ example value 37 37 % 15 = 7 What does this do? 37 - 15 = 22 22 - 15 = 7 7 remains. ]] Does this help out?