Jump to content

Price.

Members
  • Posts

    244
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Price.'s Achievements

Red-Headed Stepchild

Red-Headed Stepchild (19/54)

0

Reputation

  1. Price.

    Output problem

    Thanks, its working perfectly now!
  2. Price.

    Output problem

    when I get outside the col shape it refuses to get me inside again using that command
  3. Price.

    Output problem

    alright now I'm trying a last thing but idk what's wrong lel, I'm trying to do if he got to the island using /staffland command then he can no longer use it inside the COLshape of the land, I made the checks and all but I can still teleport when I'm inside function staffcommand (player, command) local account = getPlayerAccount(player) local x, y, z = getElementPosition(player) if account and not isGuestAccount(account) then local accName = getAccountName(account) if not (isPedInVehicle(player) and getPedOccupiedVehicle (player)) then if ( isObjectInACLGroup ("user."..accName, aclGetGroup ("Admin"))) then if player and isElement(player) and (getElementType(player) == "player") then setElementPosition ( player, 3749.9094238281, -194.06666564941, 5.3276481628418 ) end else outputChatBox("Only staff can use this command.", player, 255, 0, 0) end end if player and isElement(player) and (getElementType(player) == "player") then if isPedInVehicle(player) and getPedOccupiedVehicle (player) then outputChatBox("You cannot use this command inside a vehicle.", player, 255, 0, 0, true) end end end end if player and isElement(player) and (getElementType(player) == "player") then local account = getPlayerAccount(player) local x, y, z = getElementPosition(player) if account and not isGuestAccount(account) then local accName = getAccountName(account) local detection = isElementWithinColShape ( player, islandCOL ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ("Admin"))) then local detection = detection and getElementDimension( player ) == getElementDimension( islandCOL ) if isElementWithinColShape ( player, islandCOL ) == true then removeCommandHandler ( "staffland" ) outputChatBox("You are already in the staff island.", player, 255, 0, 0, true) end end end end addCommandHandler("staffland", staffcommand) any help?
  4. so I'm making a simple command but I guess I complicated it the way I made it, Im making a check if the player is an admin and if he is a player then he setPos to certain location, if he is not then output "you cannot use this command ", and if he is in a vehicle return false with output outputs are all mixed sometimes and I can't get all to work at the right situation function staffcommand (player, command) local account = getPlayerAccount(player) local x, y, z = getElementPosition(player) if account and not isGuestAccount(account) then local accName = getAccountName(account) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ("Admin"))) then if player and isElement(player) and (getElementType(player) == "player") then setElementPosition ( player, 3749.9094238281, -194.06666564941, 5.3276481628418 ) end else outputChatBox("Only staff can use this command.", player, 255, 0, 0) end end if player and isElement(player) and (getElementType(player) == "player") then if (isPedInVehicle(player) and getPedOccupiedVehicle (player)) then return outputChatBox("You cannot use this command inside a vehicle.", player, 255, 0, 0, true) end end end addCommandHandler("staffland", staffcommand)
  5. i've tried doing as you've gave in the link but i reversed accounts, added setaccountdata first and get it later and reversed events, now i know how i could save time with acc data, thanks walid!
  6. still can't figure out how to save the time so when he enters again the timer continues where it left off
  7. is it possible to save using getPlayerAccount? bec its already there and I think I saved a time before using it instead of accountdata
  8. getElement data doesn't save if he logs out of the server and logs in too, I honestly don't like to use element data, isn't there a way around to save it using account, same style you used?
  9. I want it to be saved so when the player keeps getting out and inside the col shape it continues from where it left off so the player doesn't abuse going out and it
  10. when I enter the col shape, I pretty much think it doesn't let the timer go on from where it left off when I entered first time, I entered a lot and every time I go out and go on several times, I don't die so I pretty much think the timer doesnt save where it left off
  11. Now I can't fire with any gun at all, but when I enter LV i can ExplosiveID = { [16] = true, [17] = true, [18] = true, [39] = true, [40] = true, } local hillAreaLS = createColRectangle ( -905.5929, -2933.0986, 4000, 3500 ) local hillAreaSF = createColRectangle( -2994.09448,-1378.01746,2000,4900) local hillAreaLV = createColRectangle (-905.5929,602.33,4000,2500) function hill_EnterLS ( thePlayer, matchingDimension ) outputChatBox( "You have entered Los Santos", thePlayer, 255, 255, 0 ) local slot = getPedWeaponSlot ( thePlayer ) if (getElementType(thePlayer) == "player") and ( slot == -- s8) --> then toggleControl(thePlayer, "fire", false) else toggleControl(thePlayer, "fire", true) -- setPedWeaponSlot ( thePlayer, 0 ) end end addEventHandler ( "onColShapeHit", hillAreaLS, hill_EnterLS ) function hill_EnterSF ( thePlayer, matchingDimension ) outputChatBox( "You have entered San Fierro", thePlayer, 255, 255, 0 ) local slot = getPedWeaponSlot ( thePlayer ) if (getElementType(thePlayer) == "player") and ( slot == -- s8) --> then setPedWeaponSlot ( thePlayer, 0 ) end end addEventHandler ( "onColShapeHit", hillAreaSF, hill_EnterSF ) function hill_EnterLV ( thePlayer, matchingDimension) local slot = getPedWeaponSlot ( thePlayer ) if (getElementType(thePlayer) == "player") and ( slot == 8 ) then toggleControl ( thePlayer, "fire", true ) outputChatBox("You have entered Las Venturas", thePlayer, 255, 255, 0) end end addEventHandler ( "onColShapeHit", hillAreaLV, hill_EnterLV ) bannedIds = {16,17,18,39,40} addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), function ( previousWeaponID, currentWeaponID) for i, thePlayer in ipairs(getElementsByType("player")) do local city = getElementZoneName(thePlayer, true) if city == "Las Venturas" then local slot = getPedWeaponSlot(thePlayer) for _,id in ipairs(bannedIds) do if slot == id then toggleControl(source, "fire", false) else toggleControl(source, "fire", true) end end end end end ) @Tails, Uhm Its not a problem to make it force switch to fists, I will still be able to switch to grenades then, Its about preventing switching to grenades / Disable firing them
  12. hmm, works but the main purpose still not working, I can switch back to nades regularly
×
×
  • Create New...