NextGenRP
Members-
Posts
48 -
Joined
-
Last visited
Everything posted by NextGenRP
-
When a player enters a vehicle the engine automatically comes on, How can i stop this?
-
The button isn't created until the GUIFunction creates the GUI, So i can't add an event handler to a button that doesn't exist? Im not sure but i don't think so, I see you put the handler under the function i want to use i moved the function above the GUIFunction and it seems to work thanks
-
Yeah i noticed that but it still doesn't work
-
Hey im trying to close a GUI, function GUIFunction() -- other gui elements are here that work fine, Including a button that works fine too. closeButtonn = guiCreateButton(sWidth-697,sHeight-425,sWidth-981,sHeight-744,"Close",false,registerWindow) addEventHandler("onClientGUIClick", closeButtonn, closeRegiWindow, false) end function closeRegiWindow() destroyElement(registerWindow) --I want to destroy the window, If the player clicks on the button that opened it it will run the GUIFunction again. end It just acts as if im not clicking the button when i am and there is no errors in the debug.
-
Yeah your right i just tested it, Going to need to change that now thanks, Updated the first post but still doesn't work.
-
Ok first thing first, What do you think is better for RP; The vehicle disappears when the player logged out or the vehicle stays there after logout? also when trying to remove the vehicle i had a problem but no errors in the debug function onLogout(source) local vehs = getElementsByType("vehicle") for k,i in ipairs(vehs) do local owner = getElementData(i,"Owner") if owner == getAccountName(getPlayerAccount(source)) then destroyElement(i) end end end addEventHandler("onPlayerLogout", getRootElement(), onLogout) A player can have more than one vehicle btw. Any help is appreciated thanks. Edit: Updated the owner to account name.
-
Thanks i like the hitman idea and im not sure if NextGen used to be a SA-MP server I've never used SA-MP and from the way it sounds i wouldn't want too PM me if you got any more ideas mate no need to write here anymore
-
Hey Im trying to output to the chatbox to players in the area of another player. So say if something happens to a player e.g onPlayerDamage I can add things like an outputChatBox to players in a certain distance of the player that triggered the event, I just need to know what functions to use to get the players near the player please.
-
Thanks Solidsnake14 works perfect
-
If a player types /logout and the script kicks the player for logging out will it still trigger the onPlayerQuit event because the player was kicked and didn't quit? Also is there any way to remove the /logout command all together?
-
Thanks guys don't need anymore replies here now i think.
-
Ahh thanks Solidsnake14 fast reply and it works thanks.
-
Thanks guys can you see where the error is here: closeWindowbut = guiCreateButton(168,368,114,34,"Close",false,jobWindow) addEventHandler("onClientGUIClick", closeWindowbut, closeWindow, false) function closeWindow(button) if button == "left" then if source == closeWindowbut then guiSetVisible(jobWindow, false) showCursor(false) end end end It doesn't seem to do anything when i click the button.
-
So i still need to set it server side? Also (didn't want to start a new thread) if im doing this: triggerServerEvent("createNewChar", getLocalPlayer(), firstname, lastname, age, descript, weight, muscle) How do i start the server function? function createChar(firstname, lastname, age, descript, weight, muscle) Like that or this: function createChar(source, firstname, lastname, age, descript, weight, muscle) Don't worry about telling me about the events and stuff i got that covered (I think)
-
Works perfect thanks Solidsnake14
-
Nah i don't understand what you mean there mate
-
I just can't get my head around this man, function onSkinbackBtun(button) if(button == "left") then if(source == backSkinButton) then local skin = getElementModel(getLocalPlayer()) if(skin ~= 0) then local allskins = getValidPedModels ( ) for key, newskin in ipairs( allSkins ) do if newskin == tonumber( skin -1 ) then setElementModel(getLocalPlayer(),skin -1) guiSetText(skinIDLabel,"ID: "..getElementModel(getLocalPlayer())) else outputChatBox("You can't go back any more!", 255,255,0) end playSoundFrontEnd ( 32 ) end end end end end But how do i make it if the skin is not valid to set it to the next available skin?
-
Im not sure of all the MTA functions but i suppose this is probably the noob way around it, create markers where the peds are spawning that you dont want them too and if the ped is in the marker then destroyElement(pedvariable) or maybe you should use a col shape. I don‘t know if this is the best option but it can work. Another way would be to create an edf for the spawn points of the peds then they will only spawn in places you choose, Take a look at the zombie resource by slothman if your not sure.
-
Thanks Solidsnake14 that will work.
-
Hey guys, I've created some GUI buttons so a player can select their skin but the problem is i have done it like this: When they press the "Back Skin" button it does it like this: setElementModel(getLocalPlayer(),skin -1) And the same with "Next Skin", But when the skin gets to 2 it stops changing the skins, I think its because there is no skin 3 so how can i "skip" the ones that are not there?
-
Thanks for the reply CapY, Ill be using MySQL then.
-
Hey im creating a new roleplay game mode, Pretty much like most other roleplay modes but i have some great ideas in store for this. First off this will NOT be a vG edit or anything to do with vG! I've already created the accounts system, only the basic login and starting features using the MTA accounts system but anyway i came here to ask some questions. 1.What is the best system to use to save characters/items/anything else i need to save? 2.What is the problem with all the RP servers DDoSing each other? If anyone want's to help me feel free, If you do want to help make sure you can script because im not wasting any time.
