Jump to content

AlexMiller

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by AlexMiller

  1. Ok, thanks! i did it by following you tut, but now there's another problem: I get this error: Bad Argument @ SetPlayerTeam line... and Bad argument @ killPed I added another event for assigning a team to player function cop ( player, teamName ) local theTeam = "Cops" setPlayerTeam ( player, theTeam ) outputChatBox ( "You are now a Cops member!", player ) killPed( player ) end addEventHandler ( "Cops", getRootElement(), cop ) addEvent( "Robs", true ) function rob ( player, teamName ) local theTeam = "Robbers" local thePlayer = getLocalPlayer setPlayerTeam ( player, theTeam ) outputChatBox ( "You are now a Robs member!", player ) killPed( player ) end addEventHandler ( "Robs", getRootElement(), rob ) I'll login this evening surely, so write any suggestion you have, please Note: That happens when i press the button. And this is the server side script
  2. I think the problem is on the triggerServerEvent, 'cause the rest i think it's correct, if you know the reason of these errors please tell me it
  3. Thanks for answering, i used the debugger and there were a badargument on addeventhandler in the client file. The incriminated lines are addEventHandler("onClientGUIClick", copskin, spawnacops) and addEventHandler("onClientGUIClick", robskin, spawnarobs) Any suggestion?
  4. Hi there, that's my first post on the forum but i'm not new here. I'm having a problem with a starting GUI that let you choose joining a faction between Groove and police. The GUI is visible but the join buttons does nothing. Here's the client-side script: function creafinestra() showCursor(true) GUIEditor_Button = {} skinwdw = guiCreateWindow(327,162,370,210,"CHOOSE A FACTION TO JOIN",false) guiWindowSetMovable(skinwdw,false) guiWindowSetSizable(skinwdw,false) copskin2 = guiCreateStaticImage(0.0243,0.0952,0.2568,0.8619,"images/copskin.png",true,skinwdw) robskin2 = guiCreateStaticImage(0.7108,0.1143,0.2649,0.8429,"images/robskin.png",true,skinwdw) copskin = guiCreateButton(0.2811,0.381,0.2054,0.2333,"POLICE",true,skinwdw) robskin = guiCreateButton(0.5054,0.381,0.2027,0.2333,"ROBBER",true,skinwdw) end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource( ) ), creafinestra) function spawnacops(button) if button == "left" then triggerServerEvent("Cops", player) guiSetInputEnabled(false) guiSetVisible(skinwdw, false) showCursor(false) end end addEventHandler("onClientGUIClick", copskin, spawnacops) function spawnarobs(button) if button == "left" then triggerServerEvent("Robs", player) guiSetInputEnabled(false) guiSetVisible(skinwdw, false) showCursor(false) end end addEventHandler("onClientGUIClick", robskin, spawnarobs) and that's the server-side script: addEvent( "Cops", true ) function entercops ( player, command, teamName ) local myTeam = getPlayerTeam ( player ) if ( myTeam ) then outputChatBox ( "You are already member of a team!", player ) else setPlayerTeam ( player, teamCops ) outputChatBox ( "You are now a Cops member!", player ) killPed( player ) end end addEventHandler ( "Cops", getRootElement(), entercops ) addCommandHandler ( "joincops", entercops, createTeamsOnStart ) addEvent( "Robs", true ) function enterrobs ( player, command, teamName ) local myTeam = getPlayerTeam ( player ) if ( myTeam ) then outputChatBox ( "You are already member of a team!", player ) else setPlayerTeam ( player, teamRobbers ) outputChatBox ( "You are now a Robs member!", player ) killPed( player ) end end addEventHandler ( "Robs", getRootElement(), enterrobs ) addCommandHandler ( "joinrobs", enterrobs, createTeamsOnStart ) Thanks for help!
  5. Guys i dont know whats the date tomorrow, can you answer me and say its 1st of April pls?
  6. Hi all, im new on the forum. i have a problem with saving maps, i cant find them, but if i search the maps ingame i can load them.The server directory on my Desktop, i also did a search over my PC, no maps. Help me pls
×
×
  • Create New...