Jump to content

CJGrove

Members
  • Content Count

    54
  • Joined

  • Last visited

Community Reputation

0 Neutral

About CJGrove

  • Rank
    Snitch
  • Birthday 30/07/1994

Details

  • Location
    EU, Netherlands
  1. Nevemind this, I got it working. It's realy silly acutly. The key was bind in an other function (original). Forgot to delete that line so. It works now thanks for evrything . Greetings CJGrove.
  2. Wait is enter not a control? It is becose it stands in the script of cdm: Copied from cdm. bindKey ( player, "enter", "down", cdm_spawn, player )
  3. Read edit2. Edit: function isguest ( ) player = getClientAccount ( source ) if isGuestAccount ( player ) then unbindKey ( player, "enter", "down", cdm_spawn ) outputChatBox ( "You need to login before you can spawn. (/login password) (/register password)", sourceAccount ) else bindKey ( player, "enter", "down", cdm_spawn ) end end addEventHandler ( "onPlayerJoin", getRootElement(), isguest ) function guestlogin () local player = getPlayerFromNick (getClientName (source)) bindKey ( player, "enter", "down", cdm_spawn ) end addEventHandler("
  4. Error: [12:45:09] SCRIPT ERROR: ...n/MTA Server/mods/deathmatch/resources/functionscript/functionscript.lua:820: unexpected symbol near ')' [12:45:09] INFO: Loading script failed: ...n/MTA Server/mods/deathmatch/resources/functionscript/functionscript.lua:820: unexpected symbol near ')' Edit: Using this code function isguest ( ) sourceAccount = getClientAccount ( source ) if isGuestAccount ( sourceAccount ) then unbindKey ( player, "enter" ) outputChatBox ( "You need to login before you can spawn. (/login password) (/register password)", sourceAccount ) else
  5. Thanks for fast and good reply Mr.Hankey, Still got a lot to learn i gues... But were not quite there yet Using this code: function isguest ( ) sourceAccount = getClientAccount ( source ) if isGuestAccount ( sourceAccount ) then toggleControl ( source, "enter", false ) outputChatBox ( "You need to login before you can spawn. (/login password) (/register password)", sourceAccount ) else toggleControl ( source, "enter", true ) end end addEventHandler ( "onPlayerJoin", getRootElement(), isguest ) function guestlogin () toggleControl ( source, "ent
  6. Hello, I tried to make a script that would it make impossible for guests to spawn. (enter is spawn button) But i got some errors but it is like this documented on wiki. script: function isguest ( playerSource ) sourceAccount = getClientAccount ( playerSource ) if isGuestAccount ( sourceAccount ) then toggleControl ( source, "enter", false ) outputChatBox ( "You need to login before you can spawn. (/login password) (/register password)", sourceAccount ) else toggleControl ( source, "enter", true ) end end addEventHandler ( "onPlayerJoin", getRootElement(
  7. I don't get the command handler. Please explain this to me. addCommandHandler ( "GT-Refresh", unload ) Why unload while the function name is load? Greetings, CJGrove
  8. Hello all, I tried something like this but it doesn't kill the player can someone help me with this? Thanks in advance function setFriendlyFireOn ( ) for index, theTeam in ipairs ( getElementsByType("team") ) do if ( getTeamFriendlyFire ( theTeam ) == false ) then setTeamFriendlyFire ( theTeam, true ) outputChatBox ( "Friendly fire turned ON", 255, 0, 0 ) outputDebugString ( "Friendly fire turned ON", 3 ) else setTeamFriendlyFire ( the
  9. You can beter use give player so a player keeps his last money. addEventHandler("onPlayerSpawn", getRootElement(), function givePlayerMoney( source, 10000 ) -- gives the player $10,000 on spawn end )
  10. Think this should work? function checkName() if getClientName ( source ) =~ getPlayerUserName ( source ) then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) This will stop them for using an other name (fake) then their username.
  11. Lol there are converters. like http://up.delux-host.com/1192573787/index.php5.
  12. Euh you could write a lua file?
  13. Just use the race map editor lol.
×
×
  • Create New...