- 
                Posts161
- 
                Joined
- 
                Last visited
Everything posted by FWCentral
- 
	Sorry just edited my above post, Its working fine now thanks.
- 
	It works fine now thank you!
- 
	local team = getPlayerTeam(source) If i use this onPlayerSpawn then it doesn't get the team, is there any way around this? Note: When a player dies they lose there team and when they spawn they get a team from another resource.
- 
	oops thanks
- 
	bindKey("f2", "down", showpanel) VehiclePanel = guiCreateWindow(313,260,515,337,"Vehicle Panel",false) ^ that is onClientResourceStart works fine function showpanel() if (guiGetVisible(VehiclePanel) == true ) then guiSetVisible(VehicePanel, false) showCursor(false) else guiSetVisible(VehicePanel, true) -- Get error here saying expected gui-element and just shows the mouse. showCursor(true) end end
- 
	Nah that works fine, its: veh = createVehicle(560, -1655.89819, 1211.46692, 20.5659,0,0,60) setCameraMatrix(-1658.09436, 1219.95898, 22.1562) That makes it go to the right place, Works fine - When i reconnect to the server this will be the exact same script but it will be in a different direction. EDIT Seems to be working fine now, Didn't change anything EDIT And now its not
- 
	Yeah its after the player has chosen a vehicle from the shop that is opened by a marker, so i want it to be in the same position every time.
- 
	It just moves, I put it at the right location then restart the script and it looks fine, Then without editing the script again when i reconnect or restart then it moves to a different place right near the place it should be
- 
	Im trying to make a vehicle shop, the setCameraMatrix worked but it still moves when i reconnect or restart it. veh = createVehicle(560, -1655.89819, 1211.46692, 20.5659,0,0,60) setCameraMatrix(-1658.09436, 1219.95898, 22.1562)
- 
	ok i used setCameraMatrix and it changes positions on its own, One time its in one place the next when i restart its moved without me editing it. (NVM working now ) Thanks solidsnake! Edit: Its still doing the error i mentioned above
- 
	im trying to create a vehicle shop, I need to make the camera aim at a vehicle. Client: local veh = createVehicle(560, -1655.89819, 1211.46692, 20.5659,0,0,60) setCameraTarget(veh) This doesn't do anything? (It does create the vehicle and there are no errors)
- 
	Tried it and it works fine thanks.
- 
	Thanks you both got it so i can keep my server markers if i use Solidsnake14's method?
- 
	How can i create a marker(checkpoint) only visible to the player that started the function? I've already tried this: firstmarker = createMarker(1372.04126, -1600.24585, 13.24007,"checkpoint", 1.5, 0, 255, 0, false)--Also tried source and getRootElement as the last argument this didn't work -- other stuff like marker blip ( This works only visible to the player ) for id, player in ipairs(getElementsByType("player")) do -- added this to see if i can hide it from all players setElementVisibleTo ( firstmarker, player, false ) end setElementVisibleTo(firstmarker, source, true) -- then show it to the source -- this is inside a function that is triggerd from client that works fine. So far ive had no luck with this, I tried adding it client side but onMarkerHit is Server Sided so i don't know whats going on with this.
- 
	where was the error?
- 
	Meh i cant get it to work, Sorry to double post but no one will reply if i edit. server: function sell(source, commaneName) local x,y,z = getElementPosition(source) thearmsmark = createMarker( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) --setElementData(thearmsmark, "owner", getPlayerName(source)) setElementParent(thearmsmark, source) end addCommandHandler("sell", sell) addEvent("buygunuzi",true) function buyuzi(source) if isElementWithinMarker(source, thearmsmark) then local seller = getElementParent(thearmsmark) takePlayerMoney(source, 170) giveWeapon(source,28,50,false) end end addEventHandler("buygunuzi",getRootElement(),buyuzi) Client: local weapon = guiGridListGetItemText ( weapongridlist, guiGridListGetSelectedItem ( weapongridlist ),1) if weapon == "Uzi" then local money = getPlayerMoney(getLocalPlayer()) if (money > 170) then triggerServerEvent("buygunuzi", getLocalPlayer()) else end end The client side works fine but i get an error at: if isElementWithinMarker(source, thearmsmark) then
- 
	Hey thanks for the reply, i wrote that at like 4am haha. Anyway ill try using that and get back here.
- 
	Hey im creating an arms dealer script and im not sure how i can get the marker directly in front of the player that wants to sell at the moment its just inside the player using getElementPosition Also, I can take the players money but how do i give the other player that is selling money?
- 
	Great it works now, thank you Solidsnake14!
- 
	Yeah i tried that also still wouldn't work
- 
	Ok Im making a wanted system that shows up stars and it works fine, i made this command: (Client) function wantme() local wlvl = getElementData(getLocalPlayer(),"Wanted-Level") setElementData(getLocalPlayer(), "Wanted-Level", wlvl+1) end addCommandHandler("wantme", wantme) This works fine and it makes a star add to the GUI. I want to make it when the player was damaged the attacker will get a star unless the attacker is a certain skin: (Client) function damagestars ( attacker, weapon, bodypart, loss ) if (getElementModel(attacker) == 280 or 284) then else local wlevel = getElementData(attacker, "Wanted-Level") setElementData(attacker, "Wanted-Level", wlevel+1) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), damagestars ) EDIT: Thought this might help more to why its not working, Im using onClientElementDataChange to trigger the star function.
- 
	Ok how can i contact you 50p?
- 
	Thanks, Puma i see you can model stuff would you not be interested?
- 
	FWCentral is searching for people that can create models in MTASA, This includes: Ped Skins, Vehicle modifications and some other things we need creating i cannot specify, A reward can be arranged if your not willing to help for free.(Most People Are not.) If your interested PM me here or Email [email protected]
- 
	In the spawn system there is alot of spawns but in the actual spawn itself i took out everything apart from the spawnplayer and it still crash, Other people tried and it worked fine for them so i left it and now it works but still times me out sometimes.

 
        