-misterX- Posted January 13, 2013 Posted January 13, 2013 why doesnt the warntext work??? function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then if getElementType ~= zombie then local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( pla ) ) ) if ( gang == "ARMY" ) then warnText ( "Welcome", pla ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) warnText ( "You entered a restricted area", pla ) end end end end end addEventHandler ( "onColShapeHit", g_base_col, hit )
MR.S3D Posted January 13, 2013 Posted January 13, 2013 why doesnt the warntext work??? function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then if getElementType ~= zombie then local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( pla ) ) ) if ( gang == "ARMY" ) then warnText ( "Welcome", pla ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) warnText ( "You entered a restricted area", pla ) end end end end end addEventHandler ( "onColShapeHit", g_base_col, hit ) in the line 5 you are not defined zombie Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
Anderl Posted January 13, 2013 Posted January 13, 2013 And you're comparing 'getElementType' function with 'zombie'. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now