Jump to content

script not work =( help please!


Kenix

Recommended Posts

hi guys

I want to make that any player entering into a zone lit up

But that instead of all players lit up help please?

Here my script on the server side

  
fire =  createColCircle( 2358.8, -104.8, 1 ) -- create the colshape 
fire1 =  createColCircle( 2347.68, -107.7, 1 ) -- create the colshape 
  
  
function Limite (hitPlayer,matchingDimension) 
local player = getPlayerAccount(hitPlayer) 
 if (getAccountData(player,"Permission to get out") == false) then 
   isPedOnFire ( localPlayer ) ------// this line not work 
 end 
end 
addEventHandler ("onColShapeLeave",fire,Limite) 
  
function Limite (hitPlayer,matchingDimension) 
local player = getPlayerAccount(hitPlayer) 
 if (getAccountData(player,"Permission to get out") == false) then 
    setPedOnFire ( localPlayer ) ------// this line not work 
 end 
end 
addEventHandler ("onColShapeLeave",fire1,Limite) 
  

Link to comment

1. your hitPlayer is not always player element.

2. both functions are named the same.

3. calling isPedOnFire without "if" have same sense like replacing this line with "false". means NOTHING.

4. Do you set "Permission to get out" anywhere? And I suggest you to aviod names like this. Don't use spaces etc. Make it short.

5. local player = getPlayerAccount -- better don't call your ACCOUNT element like here - "player" - it's confusing!

6. localPlayer is not defined

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...