Blaawee Posted October 30, 2011 Share Posted October 30, 2011 (edited) setTeamFriendlyFire (teammechanic, false) setTeamFriendlyFire (teamtaxi, false) setTeamFriendlyFire (teamlimo, false) setTeamFriendlyFire (teammedic, false) setTeamFriendlyFire (teamtrucker, false) setTeamFriendlyFire (teampolice, false) setTeamFriendlyFire (teammaffia, false) setTeamFriendlyFire (teamhippie, false) setTeamFriendlyFire (teammedic, false) --Limocommand: limoCommand function (thePlayer, command) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) limoCancelCommand function (thePlayer, command) outputChatBox ("Invoked bus." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the bus!" getRootElement (), 255, 190, 0, false) destroyElement (limoOphaalBlip) end addCommandHandler ("nolimo" limoCancelCommand) betaaldelimoChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 25) takePlayerMoney (thePlayer, 25) outputChatBox ("you paid $ 25 to ride," thePlayer) destroyElement (limoOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldelimoChaufeur) --Medic command: medicCommand function (thePlayer, command) destroyElement (medicOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("Ambulance on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the ambulance!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("medic", medicCommand) medicCancelCommand function (thePlayer, command) outputChatBox ("Emergency revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the ambulance!" getRootElement (), 255, 190, 0, false) destroyElement (medicOphaalBlip) end addCommandHandler ("nomedic" medicCancelCommand) betaaldemedicChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 100) takePlayerMoney (thePlayer, 100) outputChatBox ("you paid 100", thePlayer) destroyElement (medicOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldemedicChaufeur) --Taxi command: taxiCommand function (thePlayer, command) destroyElement (taxiOphaalBlip) taxiOphaalBlip = createBlipAttachedTo (thePlayer, 48, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("taxi on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the taxi!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("taxi", taxiCommand) taxiCancelCommand function (thePlayer, command) outputChatBox ("Taxi revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the taxi!" getRootElement (), 255, 190, 0, false) destroyElement (taxiOphaalBlip) end addCommandHandler ("notaxi" taxiCancelCommand) betaaldeChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 420) and (seat ~ = 0) then driver = getVehicleOccupant (source, 0) givePlayerMoney (Driver, 50) takePlayerMoney (thePlayer, 50) outputChatBox ("you paid $ 50 per ride," thePlayer) destroyElement (taxiOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldeChaufeur) --Mechanic: fixCar function (player, command) skin = getPedSkin (player) if (skin == 50) then local vehicle = getPedOccupiedVehicle (player) if (vehicle) then fixVehicle (vehicle) takePlayerMoney (player, 250) end end end addCommandHandler ("fix", fixCar) --Medic Heals healFlowers function (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss> 1) and (theHealth <80) then setElementHealth (source, 100) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage" getRootElement (), healFlowers) --Police arrest: PoliceCuff function (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss> 2) then setElementPosition (source, -1616.17, 683.47, 7.18, true) takePlayerMoney (source 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage" getRootElement (), PoliceCuff) --Kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamaztecs) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Vagos kill Reward killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamvagos) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Maffia kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teammaffia) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Police Vehicles and Skins: policeVehicles = {[598] = true, [596] = true, [597] = true, [599] = true, [528] = true, [523] = true, [497] = true} policeSkins = {[280] = true, [288] = true, [284] = true} policeenterVehicle function (player, seat, jacked) if (policeVehicles [getElementModel (source)]) and (not policeSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not cop, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), policeenterVehicle) --Mechanic Vehicles and Skins: mechanicVehicles = {[525] = true} mechanicSkins = {[50] = true} mechanicenterVehicle function (player, seat, jacked) if (mechanicVehicles [getElementModel (source)]) and (not mechanicSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a mechanic, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Swat Vehicles and Skins: swatVehicles = {[433] = true, [490] = true, [427] = true, [601] = true, [525] = true} swatSkins = {[285] = true} swatenterVehicle function (player, seat, jacked) if (swatVehicles [getElementModel (source)]) and (not swatSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not SWAT, you can not lead this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Taxi Vehicles and Skins: taxiVehicles = {[420] = true} taxiSkins = {[7] = true} taxienterVehicle function (player, seat, jacked) if (taxiVehicles [getElementModel (source)]) and (not taxiSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a taxi driver, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), taxienterVehicle) --Alleen voor hippie autos autoverkoperVehicles = {[483] = true} autoverkoperSkins = {[100] = true} autoverkoperenterVehicle function (player, seat, jacked) if (autoverkoperVehicles [getElementModel (source)]) and (not autoverkoperSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not the guard, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), autoverkoperenterVehicle) --Medic Vehicles and Skins: medicVehicles = {[416] = true} medicSkins = {[275] = true} medicenterVehicle function (player, seat, jacked) if (medicVehicles [ Edited October 30, 2011 by Guest Link to comment
Charlie_Jefferson Posted October 31, 2011 Share Posted October 31, 2011 Maybe it doesn't work because you wrote the function's names, before function? Link to comment
CapY Posted October 31, 2011 Share Posted October 31, 2011 setTeamFriendlyFire (teammechanic, false) setTeamFriendlyFire (teamtaxi, false) setTeamFriendlyFire (teamlimo, false) setTeamFriendlyFire (teammedic, false) setTeamFriendlyFire (teamtrucker, false) setTeamFriendlyFire (teampolice, false) setTeamFriendlyFire (teammaffia, false) setTeamFriendlyFire (teamhippie, false) setTeamFriendlyFire (teammedic, false) --Limocommand: limoCommand function (thePlayer, command) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) limoCancelCommand function (thePlayer, command) outputChatBox ("Invoked bus." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the bus!" getRootElement (), 255, 190, 0, false) destroyElement (limoOphaalBlip) end addCommandHandler ("nolimo" limoCancelCommand) betaaldelimoChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 25) takePlayerMoney (thePlayer, 25) outputChatBox ("you paid $ 25 to ride," thePlayer) destroyElement (limoOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldelimoChaufeur) --Medic command: medicCommand function (thePlayer, command) destroyElement (medicOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("Ambulance on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the ambulance!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("medic", medicCommand) medicCancelCommand function (thePlayer, command) outputChatBox ("Emergency revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the ambulance!" getRootElement (), 255, 190, 0, false) destroyElement (medicOphaalBlip) end addCommandHandler ("nomedic" medicCancelCommand) betaaldemedicChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 100) takePlayerMoney (thePlayer, 100) outputChatBox ("you paid 100", thePlayer) destroyElement (medicOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldemedicChaufeur) --Taxi command: taxiCommand function (thePlayer, command) destroyElement (taxiOphaalBlip) taxiOphaalBlip = createBlipAttachedTo (thePlayer, 48, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("taxi on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the taxi!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("taxi", taxiCommand) taxiCancelCommand function (thePlayer, command) outputChatBox ("Taxi revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the taxi!" getRootElement (), 255, 190, 0, false) destroyElement (taxiOphaalBlip) end addCommandHandler ("notaxi" taxiCancelCommand) betaaldeChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 420) and (seat ~ = 0) then driver = getVehicleOccupant (source, 0) givePlayerMoney (Driver, 50) takePlayerMoney (thePlayer, 50) outputChatBox ("you paid $ 50 per ride," thePlayer) destroyElement (taxiOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldeChaufeur) --Mechanic: fixCar function (player, command) skin = getPedSkin (player) if (skin == 50) then local vehicle = getPedOccupiedVehicle (player) if (vehicle) then fixVehicle (vehicle) takePlayerMoney (player, 250) end end end addCommandHandler ("fix", fixCar) --Medic Heals healFlowers function (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss> 1) and (theHealth <80) then setElementHealth (source, 100) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage" getRootElement (), healFlowers) --Police arrest: PoliceCuff function (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss> 2) then setElementPosition (source, -1616.17, 683.47, 7.18, true) takePlayerMoney (source 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage" getRootElement (), PoliceCuff) --Kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamaztecs) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Vagos kill Reward killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamvagos) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Maffia kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teammaffia) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Police Vehicles and Skins: policeVehicles = {[598] = true, [596] = true, [597] = true, [599] = true, [528] = true, [523] = true, [497] = true} policeSkins = {[280] = true, [288] = true, [284] = true} policeenterVehicle function (player, seat, jacked) if (policeVehicles [getElementModel (source)]) and (not policeSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not cop, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), policeenterVehicle) --Mechanic Vehicles and Skins: mechanicVehicles = {[525] = true} mechanicSkins = {[50] = true} mechanicenterVehicle function (player, seat, jacked) if (mechanicVehicles [getElementModel (source)]) and (not mechanicSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a mechanic, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Swat Vehicles and Skins: swatVehicles = {[433] = true, [490] = true, [427] = true, [601] = true, [525] = true} swatSkins = {[285] = true} swatenterVehicle function (player, seat, jacked) if (swatVehicles [getElementModel (source)]) and (not swatSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not SWAT, you can not lead this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Taxi Vehicles and Skins: taxiVehicles = {[420] = true} taxiSkins = {[7] = true} taxienterVehicle function (player, seat, jacked) if (taxiVehicles [getElementModel (source)]) and (not taxiSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a taxi driver, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), taxienterVehicle) --Alleen voor hippie autos autoverkoperVehicles = {[483] = true} autoverkoperSkins = {[100] = true} autoverkoperenterVehicle function (player, seat, jacked) if (autoverkoperVehicles [getElementModel (source)]) and (not autoverkoperSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not the guard, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), autoverkoperenterVehicle) --Medic Vehicles and Skins: medicVehicles = {[416] = true} medicSkins = {[275] = true} medicenterVehicle Link to comment
Blaawee Posted October 31, 2011 Author Share Posted October 31, 2011 make some change : function limoCommand ( thePlayer, commandName) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) else outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) else outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) is this syntex is right ? Link to comment
CapY Posted October 31, 2011 Share Posted October 31, 2011 make some change : function limoCommand ( thePlayer, commandName) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) else outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) else outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) is this syntex is right ? Try it and you will know. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now