-
Posts
378 -
Joined
-
Last visited
Everything posted by Sparrow
-
I do admin chat script hours ago, it work well but my problem is how set the text in admin chat showed only for admins (admin and moderators) I try but I fail, nothing won't work, what is the function needed for this? thanks
-
be sure that the server is shuted down to get ACL changed
-
to set someone as admin add "user.accountName" do change to
-
are you in group in ACL?
-
shutdown the server and open it again till it get showed in "Server Browser"
-
thank you, it's working
-
I do create vehicle, set vehicle color and respaw, it in 5sec when it blowed up, but the probleme is I can't set vehicle color, this is script, where is the probleme: -- Set vehicle color. function setVehiclesColor (thePlayer, cmd, color1) if (hasObjectPermissionTo (thePlayer , "function.banPlayer", true)) then if (thePlayer) then playerVeh = getPedOccupiedVehicle (thePlayer) if (playerVeh and color1) then setVehicleColor (playerVeh, color1) else outputConsole ( "You must be in a vehicle to use this function.", thePlayer, 255, 0, 0) end end end end addCommandHandler ( "setvehcolor", setVehiclesColor ) addEventHandler("onVehicleExplode", getRootElement(), respawnVeh) the error:
-
nice TUT man, thx
-
Thanks EDIT: I can't also get in as passenger, how to fix that?
-
sorry for this double posting. I do this, I know I'm failer function vehOwner (thePlayer) local acc = getPlayerAccount (thePlayer) if not acc or isGuestAccount(acc) then return end local accName = getAccountName(acc) if ( hasObjectPermissionTo ( thePlayer , "function.banPlayer", true ) ) then if getElementData (thePlayer, "veh.owner") then setElementData (thePlayer, "veh.owner", true) outputChatBox ("You successfully seted owner of this vehicle.", thePlayer, 0, 255, 0) else setElementData (thePlayer, "veh.owner", false) outputChatBox ("Fail to set owner of this vehicle.", thePlayer, 0, 255, 0) end end end addCommandHandler ("setowner", vehOwner) function vehEnter (thePlayer) if (acc) then outputChatBox ("Welcome to your vehicle.", thePlayer, 0, 255, 0) else outputChatBox ("This vehicle is owned by "getAccountName..".", thePlayer, 255, 0, 0) end end addEventHandler ("onVehicleStartEnter", vehEnter)
-
This is it: local spawnX, spawnY, spawnZ = 386, -1926, 1 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function createVehicleForPlayer(thePlayer, spawn) local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(468),x,y,z) if (createdVehicle == false) then outputChatBox("fail",thePlayer) end end addCommandHandler ("createvehicle", createVehicleForPlayer) I test it in my local server and it's working.
-
this is it: local spawnX, spawnY, spawnZ = 386, -1926, 1 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function createVehicleForPlayer(thePlayer, spawn, 468) local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(468),x,y,z) if (createdVehicle == false) then outputChatBox("fail",thePlayer) end end addCommandHandler ("createvehicle", createVehicleForPlayer) I only remove the 'end' after addEventHandler("onPlayerJoin", getRootElement(), joinHandler)
-
thank you slayer for this information
-
I'm thinking to do a script that allow players enter the vehicles that is belong to them. (admin set the vehicle owner by the account name), and all what I need to know is the functions needed, I saw the wiki and I didn't find what is needed (didn't know what is needed for this script). thank you.
-
my script: function invisible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, false) setElementAlpha(source, 0) end end addCommandHandler ( "invis", invisible ) function visible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, true) setElementAlpha(source, 255) end end addCommandHandler ( "vis", visible )
-
And use function destroyBlipAttachedTo ( player ) local attached = getAttachedElements ( player ) if not attached then return end for index , attachedElement in pairs ( attached ) do if getElementType ( attachedElement ) == "blip" then destroyElement ( attachedElement ) end end end this didn't work, the blip didn't hided
-
It's working now, thank you but the probelems stll in mtaserver.exe
-
السلام عليكم أنا جديد في السكريبتات وبدأت في إستعمال DM gamemodes و أريد مساعدة من إخواني العرب. كيفية القيام بتحديد إطار فريق [how to do select team window (I have the GUI, I don't know what is the rest becasue I'm new)] أنا بطيئة عندما أكتب باللغة العربية شكرا
-
ok I'll try. EDIT: It's not working, still the same problem.
