Jump to content

Shayan816

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Shayan816

  1. local spawns = { { -1569.2819824219, 1196.4373779297, 7.1865711212158, 90 }, { -1661.0703125, 1212.8386230469, 32.897026062012, 90 }, { -1684.5240478516, 1360.486328125, 7.1721897125244, 90 }, { -1768.2357177734, 1175.0441894531, 25.125, 90 } } function spawn( player ) local rnd = math.random( 1, #spawns ) setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) end addCommandHandler("pvp",spawn)
  2. hey, im making a vip panel, and i have set subscription time for the user, so after the due date.. it supposed to remove the player from ACL group automatic, but its not removing.. setTimer( function() time = getRealTime() years = time.year month = time.month day = time.monthday TheDate = years+1900 .."-".. month .."-".. day for index, VIP in ipairs ( getActivationCodes() ) do local Date = gettok ( VIP [ "TimeToEnd" ], 1, string.byte('|') ) if Date == TheDate then if VIP [ "Status" ] == 'true' then setActivationCodeStatus ( VIP [ "ActivationCode" ], 'false' ) aclGroupRemoveObject(aclGetGroup("VIP"), "user."..getAccountName ( getPlayerAccount ( player ) )) for i,player in ipairs (getElementsByType("player")) do if VIP [ "PlayerName" ] == getPlayerName(player) then setElementData(player,"VIP",false) outButDxChat("#708090[VIP System] : #FF0000 Your VIP is end !!",player,0,255,255) end end end end end end,60000,0 ) after the due time ends.. player still can access /vip panel any help ?
  3. where it gone wrong ?? client server any help please ?
  4. setTimer( function() time = getRealTime() years = time.year month = time.month day = time.monthday TheDate = years+1900 .."-".. month .."-".. day for index, VIP in ipairs ( getActivationCodes() ) do local Date = gettok ( VIP [ "TimeToEnd" ], 1, string.byte('|') ) if Date == TheDate then if VIP [ "Status" ] == 'true' then setActivationCodeStatus ( VIP [ "ActivationCode" ], 'false' ) for i,player in ipairs (getElementsByType("player")) do if VIP [ "PlayerName" ] == getPlayerName(player) then setElementData(player,"VIP",false) outButDxChat("#708090[VIP System] : #FF0000 Your VIP is end !!",player,0,255,255) end end end end end end,60000,0 )
  5. hey i am making a vip panel, i created a window to set user VIP expiry date and time but its not working, it just shows VIP Expires in : Date - Time on window i set expiry date 1 week later.. and tried couple of times... but still its not showing time left.. just VIP Expires in : Date - Time on window server Any help ?
  6. maybe there is setTimer function in the script.. check your script
  7. you trying to stream the song ?? if you are trying to stream a radio then use https://wiki.multitheftauto.com/wiki/PlaySound3D
  8. Thank you very much <3 working
  9. maybe try to go in gta san andreas/data/maps and open with notepad.. this maybe ?
  10. Shayan816

    Timer Help

    Hey, how can i add timer to command handler ?? im using this script and i want to add timer, so player can use /spin once in every 10 minutes
  11. Hey, Anyone know This vehicle Skin name or Brand or logo ?
  12. its Working fine for me.. https://wiki.multitheftauto.com/wiki/Main_Page
  13. oh sorry, and Thank you so much, Its Working thank you man
  14. I started resource and when i do /pvp_check i spawned in location and when i die or get out of PVP zone.. i cant use /pvp_check again.. i did /pvp_check but nothing happened
  15. it shouldnt spawn the ammo i used before i do /pvp i bought 10 grenades and used 3 grenades, so i have 7 grenades, i did /pvp i spawned in random place and i got 10 grenades instead of 7 i got those 3 grenades back...
  16. i am trying to create random spawns for PVP zone so when players do /pvp they will spawn in random places as in table.. everything is fine but before i enter in /pvp zone i used my guns ammo, and when i do /pvp i spawned in pvp zone and i got back the ammo which i fired.. sorry for bad explanation if you didnt understand.. please watch this video i want to fix this.... did u see.. when i do /pvp its loading the weapons which i fired.. when i used this addCommandHandler("pvp", function(player) if ( isElementWithinColShape(player,col) == true ) then outputChatBox("You are already in the PVP zone!",player,255,0,0) return end setElementPosition(player,2032.6420898438,1429.3059082031,10.8203125) end) this bug doesnt exists but i wanted to add more spawns so i used this and this bug raised i should use SetElementPosition instead of spawnPlayer ?
  17. so i tried to use SetElementPosition still doesnt work local spawns = { --x, y, z, rotZ { 2096.3, 1286.6, 10.82, 90 }, { 1928.8, 1469.5, 10.82, 90 }, { 2032.6,1429.3,10.82, 90 }, { 2019.8, 1545.5, 10.82, 90 }, { 2162.1, 1644.7, 11.2, 90 }, { 2121.3, 1493.9, 10.82, 90 }, { 2163.7, 1483.6, 24.1, 90 }, { 2114.1, 1483.8, 24.1, 90 }, { 1939.8, 1343.2, 9.2, 90 }, { 2025.5, 1623.7, 11.9, 90 } } function spawn(player) if ( isElementWithinColShape(player,col) == true ) then outputChatBox("You are already in the PVP zone!",player,255,0,0) return end local rnd = math.random( 1, #spawns ) local col = getElementColShape( col ) setElementPosition(player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3], spawns[rnd][4], spawns[rnd][5], spawns[rnd][6], spawns[rnd][7], spawns[rnd][8], spawns[rnd][9], spawns[rnd][10], spawns[rnd][11] ) end addCommandHandler("pvp", spawn) debugscript 3 error Bad argument @ 'setElementPosition' [Expected bool at argument 5, got number '90']
  18. yes its same.. and i also tried with the resource you sent.. not working...
  19. i have "onPlayerSpawn in my save system its on weapons file addEventHandler("onPlayerSpawn", root, function() if not playerWeapons[source] then return end setTimer(function(player) if not isElement(player) then return end for weapon, tbl in pairs(playerWeapons[player]) do giveWeapon(player, weapon, 1, tbl.inUsing) setWeaponAmmo(player, weapon, tbl.ammo, tbl.inClip) end end, 200, 1, source) end)
  20. i already have these scripts in my save system.. along with this script
  21. i tried Stopped all resources, just freeroam running and save system.. and still same.. if i stop save system, im loosing all weapons when i go /pvp
×
×
  • Create New...