
EngMohamedLish
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by EngMohamedLish
-
Actually, fixed it, Thanks for your time, tapl
-
Here's the function. It is in the same script, which is ID_system, I think it may help?
-
Here's the function.
-
You are totally Right ! Thanks for your help, man. But, here's something: target = exports.ID_System:getPlayerFromPartialName(user2) This part, doesn't work, as when i write a player name, it returns to the same 'else' which i showed, before. But, when i write a player ID, it works fine.
-
You are totally Right ! Thanks for your help, man.
-
Still nothing.. I believe, it won't do change, as 'source' is the handler of the command, and local will work, as the script's still in the same function, yup? Anyways, help please ! addCommandHandler ("revive", function(user, cmd, user2) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( user ) ), aclGetGroup ( "Admin" ) ) then if cmd and user2 then local ID = tonumber(user2) if ID then local target = exports.ID_System:getPlayerFromID(ID) else local target = exports.ID_System:getPlayerFromPartialName(user2) end if target then if isPedDead(target) then local x, y, z = getElementPosition (target) spawnPlayer(target, x, y, z) else outputChatBox("This player is still alive", user) end else outputChatBox ("There's no online player with this name.", user) end else outputChatBox ("[syntax] /revive [iD/Partial Name]", user) end end end)
-
Here, In this script i have something wrong, i don't understand. This script is for reviving players, after their death, when i try to /revive [player name or even id] It returns to that "else" else outputChatBox ("There's no online player with this name.", source) However, the player's available..... What's wrong here? server:
-
I'll try it, but could you explain me this for index, res in ipairs(getResources()) do Just gimme a link leads me to wiki, to read about "for...do", if possible.
-
I know them both already..... As i said, i need to check for starting resources in general, not a speciefied resource... Do you understand? Lemme make an example if a resource is starting then Not a specefied resource... because , i need to do an action, when every resource starts....
-
I need to know, how to check if there are starting resources, If you didn't get it. I mean something like, checks if a resource is starting, i can do an event. I don't mean a specefied resource, I talk about, if "any" resource is starting.
-
Aha Made it man! Thanks a lot for this way ! Appreciate it.
-
isPedDead() But, how will it check if the player was dead, after he quit and join again? I mean, If a player dies, and quit, then joins again. How can i check if he was dead, before he quit? this "isPedDead' won't be enough? anything? Anyone help, please?
-
I am totally confused... tried it, doesn't work. I am confused....
-
isPedDead() But, how will it check if the player was dead, after he quit and join again? I mean, If a player dies, and quit, then joins again. How can i check if he was dead, before he quit? this "isPedDead' won't be enough?
-
Tried it, this time no error, but still no sound: addEventHandler("onClientMouseEnter", guiRoot, function(aX, aY) if source == spawn then local sound = playSound("sounds/Enter.mp3") if sound then setSoundVolume(sound, 1.0) end end end) Anything?
-
I would like to check if the player was dead, before he quit from the server. What functions used for that?
-
Tried it, this time no error, but still no sound: addEventHandler("onClientMouseEnter", guiRoot, function(aX, aY) if source == spawn then local sound = playSound("sounds/Enter.mp3") if sound then setSoundVolume(sound, 1.0) end end end)
-
Nice, it needed to change player2 with target, Thanks solved Appreciate it.
-
Problem isn't about a timer, it is about a bug: Bad argument @ 'setCameraTarget' [Expected element at argument , got string 'super' That's what i get, when i use the command.
-
Bad 'sound/player' pointer @ 'setSoundVolume'(1)
-
Yup, it works, but there's still a bug, I have setCameraMatrix already made, how can i stop it, when player be revived? I tried " setCameraTarget(player2, player2) but doesn't work.
-
addEventHandler ("onClientMouseEnter", root, function(aX, aY) if spawn then -- checks if the mouse is on the button called *spawn* sound = playSound("sounds/Enter.mp3") setSoundVolume(sound, 1.0) end end) I tried putting sound, when player approach their mouth on the button, but it didn't work, no bugs, sound added in meta.xml, as well.
-
Here in this script, there's a problem i don't understand: addCommandHandler ("revive", function(player, cmd, player2) target = getPlayerFromName(player2) if target then if isElementDead(target) then local x, y, z = getElementPosition(target) spawnPlayer(target, x, y, z) outputChatBox ("You've Revived"..target, player, 0, 255, 0, false) outputChatBox (getPlayerFromName(player).."revived you", target, 0, 255, 0, false) else outputChatBox("syntax: /revive player name", player) end end end) I made this script to revive dead people i get this error: Bad Argument @ 'getPlayerFromName [Expected string at argument 1, got nil] How it's nil? I don't understand, how can i make it so...
-
Thanks ! And, what a smart function you use !
-
Aha, Thank you man It is looking more professional idea, than the one i made ! I just don't understand something here, It is my first time to see "toJSON" and fromJSON" what is that, actually? Could you explain it, for me ? THANKS ! ! !