-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
Do you even know you can name arguments of a function anything with a few exceptions? onMarkerHit gives a element and he just defined it as thePlayer, so now thePlayer holds the value that which element hit it. Yes I know thePlayer in this case means the element who hits the specify marker, but instead of doing that check he can check dirrectly if the element's type is equal to player or else. Because, by doing this check if not getElementType(thePlayer) == "vehicle" then it will clearly let the ability to other elements that might hit the marker later
-
Do you even know you can name arguments of a function anything with a few exceptions? onMarkerHit gives a element and he just defined it as thePlayer, so now thePlayer holds the value that which element hit it. Yes I know thePlayer in this case means the element who hits the specify marker, but instead of doing that check he can check dirrectly if the element's type is equal to player or else. Because, by doing this check if not getElementType(thePlayer) == "vehicle" then it will clearly let the ability to other elements that might hit the marker later
-
I think I got what you want, You have to use these functions to do what you are looking for getPedWeaponSlot getPedWeapon getPedTotalAmmo getWeaponNameFromID
-
I think I got what you want, You have to use these functions to do what you are looking for getPedWeaponSlot getPedWeapon getPedTotalAmmo getWeaponNameFromID
-
if not getElementType(thePlayer) == "vehicle" then Of course 'thePlayer' won't be a vehicle
-
if not getElementType(thePlayer) == "vehicle" then Of course 'thePlayer' won't be a vehicle
-
Test if there's something wrong with this function or else, use onClientPlayerVehicleEnter and then set the control state
-
Test if there's something wrong with this function or else, use onClientPlayerVehicleEnter and then set the control state
-
And what's wrong with it?
-
And what's wrong with it?
-
Did you even used my last code?
-
Did you even used my last code?
-
Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc click on the functions to read more about them in the wiki. local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) local gatecol = createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. local teamName = "Your Team name here" function OpenGates (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then moveObject (gate1,2000,x,y, z ) end end addEventHandler( "onColShapeHit", gatecol, OpenGates ) function CloseGates (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. end end addEventHandler( "onColShapeLeave", gatecol, CloseGates )
-
Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc click on the functions to read more about them in the wiki. local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) local gatecol = createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. local teamName = "Your Team name here" function OpenGates (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then moveObject (gate1,2000,x,y, z ) end end addEventHandler( "onColShapeHit", gatecol, OpenGates ) function CloseGates (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. end end addEventHandler( "onColShapeLeave", gatecol, CloseGates )
-
Yeah I got it, try it now bindKey("w","up", function () local localPlayer = getLocalPlayer() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local driver = getVehicleController(vehicle) local theID = getElementModel(vehicle) if (driver == localPlayer and theID == 432) then setControlState("handbrake", false) end end end)
-
Yeah I got it, try it now bindKey("w","up", function () local localPlayer = getLocalPlayer() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local driver = getVehicleController(vehicle) local theID = getElementModel(vehicle) if (driver == localPlayer and theID == 432) then setControlState("handbrake", false) end end end)
-
addCommandHandler ("getmembers", function(player,cmd,...) -- type /getmembers for index, members in pairs(exports.gang_system:getGangMembers(table.concat({...}," "))) do if members[3] then outputChatBox(members[3],player) end end end)
-
addCommandHandler ("getmembers", function(player,cmd,...) -- type /getmembers for index, members in pairs(exports.gang_system:getGangMembers(table.concat({...}," "))) do if members[3] then outputChatBox(members[3],player) end end end)
-
@Xwad, I tried to make a proper code for you: Here you go: try it and tell me the result, because it's not tested --client sided ! bindKey("w","up", function () local localPlayer = getLocalPlayer() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local driver = getVehicleController(vehicle) local theID = getElementModel(vehicle) if (driver == localPlayer and theID == 432) then setControlState("handbrake", true) end end end)
-
@Xwad, I tried to make a proper code for you: Here you go: try it and tell me the result, because it's not tested --client sided ! bindKey("w","up", function () local localPlayer = getLocalPlayer() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local driver = getVehicleController(vehicle) local theID = getElementModel(vehicle) if (driver == localPlayer and theID == 432) then setControlState("handbrake", true) end end end)
-
I am not familiar with RACE Game modes but I can help you in building it
-
I am not familiar with RACE Game modes but I can help you in building it
-
Try to add more features to your gamemode to make it unique
-
Try to add more features to your gamemode to make it unique
-
I just answered him that he defined the team name in a variable named 'teamName' and he didn't use it at all