Jump to content

Help.


gazzxr

Recommended Posts

Posted

hi , take a look at this:

  
function chatBox() 
    rpTeleone1 = createMarker ( -1363.9683837891, 494.1506652832, 11.1953125, "cylinder", 1,0, 255, 255, 255, 255) 
     
    addEventHandler ( "onMarkerHit", rpTeleone1, onTeleone1Hit ) 
     
end 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), chatBox) 
  
function onTeleone1Hit ( player ) 
    if source == rpTeleone1 then 
    outputChatBox ( "Sergant P.J: Shit! they called for backup!", player, 0, 255, 255 ) 
    outputChatBox ( "Sergant P.J: We have sent you a helicopter for rescue!", player, 0, 255, 255 ) 
    outputChatBox ( "Sergant P.J: But you must make you're way to the helicopter!", player, 0, 255, 255 ) 
    outputChatBox ( "Sergant P.J: Hurry!", player, 0, 255, 255 ) 
    console ( "npcsparrowgo", player ) 
    end 
  end 

and this:

function setupForRace (NPC) 
    local RacerPed = createPed ( 287, -1252.2747802734, 500.51760864258, 18.16457748131 ) 
    local RaceVehicle = createVehicle ( 469, -1252.2747802734, 500.51760864258, 18.16457748131 )        
    warpPedIntoVehicle ( RacerPed, RaceVehicle )               
end 
addCommandHandler ( "npcsparrowgo", setupForRace )    

ITs all working fine , but , i cant make it when players steps in the marker , to execute command : "npcsparrowgo" tried even

outputConsole ( "npcsparrowgo", player )

Posted
  
local localPlayer = getLocalPlayer ( ) 
  
outputConsole ( "npcsparrowgo", localplayer ) 
  

I could be wrong

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

cant you just replace line 16 with setupForRace()?

if you really want make this like that, use this

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
  
local localPlayer = getLocalPlayer ( ) 
  
outputConsole ( "npcsparrowgo", localplayer ) 
  

I could be wrong

ERROR: telleports/telleports.lua:46: attempt to call global 'getLocalPlayer' (a nil value)

local localPlayer = getLocalPlayer ( ) 
      outputConsole ( "npcsparrowgo", localplayer ) 

Posted
cant you just replace line 16 with setupForRace()?

if you really want make this like that, use this

Yes i could , but then every player that steps in marker will spawn 1 helicopter and 1 NPC in it , and 1 at the time .... (you know the rest )

Posted
  
local localPlayer = getLocalPlayer ( ) 
  
outputConsole ( "npcsparrowgo", localplayer ) 
  

I could be wrong

ERROR: telleports/telleports.lua:46: attempt to call global 'getLocalPlayer' (a nil value)

local localPlayer = getLocalPlayer ( ) 
      outputConsole ( "npcsparrowgo", localplayer ) 

He don't even know that getLocalPlayer() is client sided function or he can't differentiate between server and client sided scripts. Also, could you explain what is your goal ?

Admin.png

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...