Jump to content

Tomek123

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by Tomek123

  1. I wish that after the death of a man spawn close the hospital
  2. Why this script not work? addEventHandler("onResourceStart", resourceRoot, function() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end repeat until spawnPlayer ( player, -711+math.random(1,5), 957+math.random(5,9), 12.4, 90, math.random(0,0) ) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) repeat until spawnPlayer ( player, 1611+math.random(0,1),1822+math.random(0,1), 10.6, 90, math.random(0,0) ) end )
  3. Hi all This script no work i die all time safecol = createColCuboid ( 100.16635131836, 1820.5823974609, 17.289850234985, 200, 150, 100 ) safeZoneRadar = createRadarArea ( 100.16635131836,1820.5823974609, 200, 150, 0, 255, 0, 120 ) function enterZone(hitPlayer,thePlayer) local acl = getElementModel (hitPlayer) if ( acl == GANG ) then toggleControl (hitPlayer, "fire", false ) toggleControl (hitPlayer, "aim_weapon", false) toggleControl (hitPlayer, "vehicle_fire", false) outputChatBox("Welcome, in moderator zone!", hitPlayer, 0, 255, 0) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("* WARNING: You left moderator zone!", hitPlayer, 255, 0, 0) if not ( acl == GANG ) then killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) What is wrong i set my name in ACL on GANG and i die
  4. I'm new to this so I do not know these commands. I tried and still does not work: \
  5. What is wrong? function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerzombiekills = getPlayerZombieKills ( source ) setAccountData ( playeraccount, "piraterpg.zombiekills", playerzombiekills ) end end function onPlayerJoin ( ) -- when a player joins, retrieve his money amount from his account data and set it local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerzombiekills = getAccountData ( playeraccount, "piraterpg.zombiekills" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playerzombiekills ) then setPlayerZombieKills ( source, playerzombiekills ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin )
  6. Can you give me link ? I can't find this. :\
  7. I search for that resource, and I don't found it: \ can you give me a link of resources?
  8. How do agree that the killing of zombies earn $ 350? I tried this and were reluctant. function reward ( ammo, killer, killerweapon, bodypart ) if ( killer ) and ( zombie ~= source ) then givePlayerMoney ( killer, 350 ) outputChatBox ( "** Cash #00A0FF+350$", killer, 255, 0, 0, true ) end end
×
×
  • Create New...