Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. With that, the message will appear to the local player even if a remote player tries to enter, as far as I know. addEventHandler ( "onClientVehicleStartEnter", root, function ( thePlayer ) if ( thePlayer == localPlayer ) then local plrTeam = getPlayerTeam ( localPlayer ) if ( plrTeam ) then if ( getTeamName ( plrTeam ) ~= "Air Force" ) then outputChatBox ( "This vehicle is for the Air Force Team!", 0, 100, 0 ,true ) cancelEvent ( ) end end end end )
  2. That doesn't make any sense, stop replying when you have no idea please.
  3. To see if is his/her first login, you'll have to store this data somewhere, you can use account data, which will be easy for you. Event: onPlayerLogin Functions: getAccountData setAccountData spawnPlayer
  4. I'm not going to do it all for you, is not what this section is about.
  5. You need to use dxDrawImage as well.
  6. Functions/events: Functions: getAccountName isObjectInACLGroup setElementData getElementData Events: onPlayerLogin onPlayerLogout
  7. Well, what stops you from doing what I did with the other one?
  8. Client and server side scripts don't share the variables by default, but you could sync them.
  9. Do this: When the player logins, check his/her ACL group, then set the element data, then on the client side you can use that element data to see if the player is an admin/moderator/etc.
  10. @iMr.3a[Z]eF: Would you please stop posting when you have ABSOLUTELY no idea? because most of your posts are like this one you've just made. @papam: http://lua-users.org/wiki/TablesTutorial
  11. addEventHandler ( "onPlayerChat", root, function ( msg, msgType ) if ( msgType == 1 ) then cancelEvent ( ) local r, g, b = getPlayerNametagColor ( source ) outputChatBox ( "* #FFFFFF".. getPlayerName ( source ) .."#0064FF ".. msg, root, r, g, b, true ) end end ) Is this what you need?
  12. I think he wants to create a ped inside a GUI, or something like that.
  13. Well, you were checking if there was a killer, if there was, don't increment deaths. That's why it worked with the admin panel and freeroam, because there was no killer.
  14. Try with: "Police LS".
  15. addEventHandler ( "onPlayerWasted", root, function ( totalAmmo, killer, killerWeapon, bodypart, stealth ) if ( killer ) then local account = getPlayerAccount ( killer ) if ( killer ~= source ) then setAccountData ( account,"kills",tonumber ( getAccountData ( account,"kills" ) or 0 ) +1 ) setElementData ( killer, "kills", tonumber ( getAccountData ( account,"kills" ) ) ) setElementData ( killer, "Ratio", tonumber ( getElementData ( killer, "kills" ) / getElementData ( source, "Deaths" ) ) ) end end local accountSource = getPlayerAccount ( source ) setAccountData ( accountSource, "Deaths",tonumber ( getAccountData ( accountSource, "Deaths" ) or 0 ) +1 ) setElementData ( source, "Deaths", tonumber ( getAccountData ( accountSource, "Deaths" ) ) ) setElementData ( source, "Ratio", tonumber ( getElementData ( killer, "kills" ) / getElementData ( source, "Deaths" ) ) ) end ) Try that.
  16. Castillo

    Teams

    You're welcome.
  17. Castillo

    Teams

    ACL for what? teams has nothing to do with ACL. -- Name, Color ( R, G, B ) local teams = { { "Admin", 255, 0, 0 }, { "Armed Forces", 0, 200, 0 } } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, team in ipairs ( teams ) do createTeam ( unpack ( team ) ) end end ) With this simple script, you can add as much teams as you want.
  18. Castillo

    Teams

    Just create the team, the scoreboard will show them after.
  19. For SQLite, you can try with this query: local query = executeSQLQuery ( "SELECT * FROM sqlite_master WHERE type='table'" )
  20. How do you know it was a default pickup?
  21. Maybe the pickup wasn't a default one, but a custom pickup.
  22. You must check the level before setting the skin.
  23. You must edit your skin shop then.
×
×
  • Create New...