Jump to content

Shikken

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Shikken

  1. First make sure that your firewall is disabled, or is in-game mode.
  2. It work's for the non-admin player's with admin names, so yes you doesn't have to be admin. You can use HasObjectPermissionTo instead of using isObjectInACLGroup
  3. I bet you want to create a command: function createVehicleForPlayer(playerSource, command, vehicleModel) local playerName = getPlayerName ( playerSource ) -- Does he have access to Admin functions? if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then local x,y,z = getElementPosition(playerSource) y = y - 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) if (createdVehicle == false) then outputChatBox("Failed to create vehicle.", playerSource) else outputChatBox( getVehicleNameFromModel(vehicleModel).. " has been created for you!", playerSource) end else outputChatBox("Du bist nicht berechtigt!", playerSource) end end addCommandHandler ( "spawnveh", createVehicleForPlayer ) Just use a command /spawnveh 451 , this will spawn Turismo near you, for example.
  4. It work's now, thanks everyone for help. Sorry for double post.
  5. Cmon does someone know how to do it?
  6. I tried GetPlayerFromNick and GetPlayerName, but still it gives me an error, or it's visible to evrybody, any new ideas?
  7. Hi i want to send private message to chosen player by gui. Here is the code of button click in gui: addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == GUIEditor_Button[1]) then local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) local text = guiGetText ( GUIEditor_Edit[1] ) local localPlayerName = getPlayerName(getLocalPlayer()) local sendstring = ("PM " .. localPlayerName .. " : " .. text) triggerServerEvent ( "privateevent", getRootElement( playerName ), sendstring ) end end end ) Here is the code on server-side: function sendprivatemessage ( message ) outputChatBox ( message, source, 255, 255, 0, true ) end addEvent( "privateevent", true ) addEventHandler( "privateevent", getRootElement( playerName ), sendprivatemessage ) outputChatBox is visible to all players, how i can make it visible only for the chosen player?
  8. I have the same problem, someone should fix it.
×
×
  • Create New...