Jump to content

BriGhtx3

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by BriGhtx3

  1. BriGhtx3

    Lock Help!

    function lockcar ( thePlayer ) playerVehicle = getPedOccupiedVehicle(thePlayer) local isLocked = isVehicleLocked ( playerVehicle ) if ( playerVehicle ) then if isLocked == false then setVehicleLocked ( playerVehicle, true ) outputChatBox( "Vehicle locked!", thePlayer, 255, 50, 0) isLocked = true else setVehicleLocked ( playerVehicle, false ) outputChatBox( "Vehicle unlocked!", thePlayer, 0, 255, 0) isLocked = false end end end function bindLockOnSpawn ( theSpawnpoint ) bindKey ( source, "l", "down", lockcar) end addEventHandler ( "onPlayerSpawn", getRootElement(), bindLockOnSpawn ) This will definitly work
  2. BriGhtx3

    Lock Help!

    post the errors
  3. The parameters of the event onPlayerChat are : string message, int messageType messageType 0 means normal message 1 means action message 2 means team chat So if the messageType is NOT 2, we cancel the event.
  4. function kickPlayerHandler (player,cmd,kickedname) if (kickedname) then local kicked = getPlayerFromName(kickedname) if (kicked) then kickPlayer(kicked) else outputChatBox("Error.: Player name not exist",player) end else outputChatBox("Error.: /kick ",player) end end addCommandHandler("kick",kickPlayerHandler) Remove the not
  5. function Extra (msg,msgType) if msgType ~= 2 then cancelEvent () outputChatBox("You Cant Type in Here Type Team Chat Only",255,255,0) end end addEventHandler( "onPlayerChat", getRootElement(), Extra)
  6. BriGhtx3

    Lock Help!

    He defined isLocked after his bindKey But it wont work, cause its just a local variable €:GanJa you also forgot the source element in your bindKey as argument
  7. BriGhtx3

    Lock Help!

    GanJa your code will not work. playerVehicle is a ped now
  8. BriGhtx3

    Lock Help!

    function lockcar ( thePlayer ) playerVehicle = getPedOccupiedVehicle(thePlayer) local isLocked = isVehicleLocked ( playerVehicle ) if ( playerVehicle ) then if isLocked == false then setVehicleLocked ( playerVehicle, true ) outputChatBox( "Vehicle locked!", thePlayer, 255, 50, 0) isLocked = true else setVehicleLocked ( playerVehicle, false ) outputChatBox( "Vehicle unlocked!", thePlayer, 0, 255, 0) isLocked = false end end end function bindLockOnSpawn ( theSpawnpoint ) bindKey ( source, "l", "down", lockcar, source ) end addEventHandler ( "onPlayerSpawn", getRootElement(), bindLockOnSpawn )
  9. BriGhtx3

    Help me!

    Haha No normally I'm not rude Just wanted to "show" him that it is wrong ;D
  10. BriGhtx3

    Help me!

    Timiit cause its serverside. Just change the onPlayerVehicleEnter to onClientPlayerVehicleEnter
  11. BriGhtx3

    Help me!

    addEventHandler("onPlayerVehicleEnter", getRootElement(), function (theVehicle) addVehicleUpgrade(theVehicle, 1010) end) This is enough. You dont need that whole code Klesh. And the getPedOccupiedVehicle part is dump, cause you enter a car. Also thePlayer is totally wrong cause in your case the thePlayer is a vehicle. I dont want to sound rude, but its rubbish code
  12. Because player is an element, and not a name Sorry my mistake. function damage(player) setVehicleDamageProof(getPedOccupiedVehicle(player),true) end addCommandHandler("proofme",damage)
  13. function damage(player) setVehicleDamageProof(getPedOccupiedVehicle(getPlayerFromName(player)),true) -- theplayer is wrong! it has to be player, like in the brackets of the function end addCommandHandler("proofme",damage) Use this
  14. show the whole function
  15. function anc(player,cmd,target) if target then pTarget = getPlayerFromName(target) setElementData(pTarget,"abc",true) end end
  16. What do you want now You have to be presicer.
  17. You can also just use SQL oO
  18. right
  19. and the timer in line 8 is totally wrong. You need arguments for the function!
  20. youre welcome
  21. This script is totally confusing Why do you render the same event twice?
  22. replace the line if isPlayerInTeam(hitElement, "Police") then with if getPlayerTeam(hitElement) == "Police" then
  23. warpPedIntoVehicle(thePlayer,Masina)
  24. Hey, I have a table with playernames and wages. Now I want to put all the players in gridlist. How can I do this? I have no code, cause I dont even know how to start. I dont want a whole code, a few tips are enough €: Got it If someone has the same problem : result = mysql_query ( handler, "SELECT * FROM workers" ) if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else if ( mysql_num_rows ( result ) > 0 ) then mitarbeiter = mysql_fetch_assoc ( result ) destinySetData(getPlayerFromName(mitarbeiter["Name"]),"firma","mclaren") destinySetData(getPlayerFromName(mitarbeiter["Name"]),"firmgehalt",mitarbeiter["Gehalt"]) destinySetData(getPlayerFromName(mitarbeiter["Name"]),"chef",mitarbeiter["chef"]) else mysql_free_result ( result ) end end
  25. yes
×
×
  • Create New...