Jump to content

Alxspiker

Members
  • Posts

    3
  • Joined

  • Last visited

Alxspiker's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Problem solved with command handler, the function name and the argument didn't match!
  2. Thank you! I like how you didn't give me the edited script but instead told me how to do it.
  3. I have 3 lua scripts with the same issue so ill give you one. The problem is at line 2. I'm a newb so I cant see the issue. setTeamFriendlyFire( teampolice, false ) teampolice = createTeam ( "Police", 0, 0, 255 ) teamswat = createTeam ( "S.W.A.T.", 0, 0, 255 ) --politie arest function PoliceCuff (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source, 1585.0130615234,-1677.2056884766,5.8971366882324, true) takePlayerMoney (source, 500) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage", getRootElement(), PoliceCuff) --alleen voor politie autos policeVehicles = { [598]=true,[596]=true,[597]=true,[599]=true, [528]=true, [523]=true, [497]=true } policeSkins = { [280]=true,[288]=true,[284]=true } function policeenterVehicle ( player, seat, jacked ) --when a player enters a vehicle if ( policeVehicles[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( player )] ) and ( seat == 0 ) then --if the vehicle is one of 4 police cars, and the skin is not a police skin removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You are not cop you can't enter this car.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), policeenterVehicle ) I also have 1 script with bad argument @ addcommandhandler @ line 16 (Expected function in argument 2 got nil) And another setFriendlyFire error at line 3. setTeamFriendlyFire(teamtaxi, false) teamtaxi = createTeam ( "Taxi Drivers", 255, 255, 0 ) --Taxicommand function taxiCommand ( thePlayer, command ) destroyElement ( taxiOphaalBlip ) taxiOphaalBlip = createBlipAttachedTo ( thePlayer, 48, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement() ) outputChatBox ("Car on the road, stay put!", thePlayer, 255, 190, 0, false ) outputChatBox ("Someone called taxi!", getRootElement(), 255, 190, 0, false ) end addCommandHandler ( "call taxi", llamartaxiCommand ) function taxiCancelCommand ( thePlayer, command ) outputChatBox ("Remember to turn off.", thePlayer, 255, 190, 0, false ) outputChatBox ("as taxi job done!", getRootElement(), 255, 190, 0, false ) destroyElement ( taxiOphaalBlip ) end addCommandHandler ( "taxi cancel", taxiCancelCommand ) --alleen voor taxi autos taxiVehicles = { [420]=true } taxiSkins = { [7]=true } function taxienterVehicle ( player, seat, jacked ) if ( taxiVehicles[getElementModel ( source )] ) and ( not taxiSkins[getElementModel ( player )] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You are not a taxi driver, you can not prowdzic this vehicle.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), taxienterVehicle ) Thanks
×
×
  • Create New...