Jump to content

help me


MoeezKhan

Recommended Posts

  • 4 weeks later...

like That tell this script is right

function setCameraOnPlayerLogin() 
          fadeCamera(source, true, 5) 
      setTimer ( fadeCameraDelayed, 1000, 1, source )     
 setCameraMatrix(source, video.mp3) 
end 
addEventHandler("onPlayerLogin", getRootElement(), setCameraOnPlayerLogin) 

Link to comment
  • 2 weeks later...

like this but is not working

  
  
  
function intro() 
local guy = getPlayerAccount(source) 
     --If he is new show the intro 
     if (getAccountData(guy,"Achievement: New Guy") == false ) then 
  
   spawnPlayer (source, -3255.5166015625+math.random(0,0), 1848.876953125+math.random(0,0), 9.8706741333008, 178.27844238281, math.random(265,312)) 
   setCameraTarget(source, true) 
  
    showPlayerHudComponent(source, "radar", false) 
    showChat(source, false) 
  
     fadeCamera(source, false) 
     setTimer(fadeCamera, 4500, 1, source, true) 
     setTimer(setElementPosition, 3000, 1, source, -3255.5166015625+math.random(0,0.5), 1848.876953125+math.random(0,1), 9.8706741333008, 178.27844238281) 
     setTimer(setElementRotation, 3000, 1, source, 0, 0, 178.27844238281) 
     setTimer(setPedAnimation, 4600, 1, source, "ped", "getup_front") 
     setTimer(setPedAnimation, 5750, 1, source, "ped", "IDLE_stance") 
     setTimer(setPedAnimation, 6200, 1, source, "ped", "WALK_civi") 
     setTimer(setCameraMatrix, 4000, 1, source, -3256.9641113281, 1833.8905029297, 13.224102973938, -3256.3107910156, 1850.1762695313, 9.8706741333008, 0, 0) 
      
     setTimer(setElementPosition, 13900, 1, source, -3255.1701660156+math.random(0,0), 1838.9616699219+math.random(0,0), 10.8706741333008, 192.73875427246) 
     setTimer(fadeCamera, 12000, 1, source, false) 
     setTimer(fadeCamera, 15000, 1, source, true) 
     setTimer(setCameraTarget, 14500, 1, source) 
  
    setTimer(showPlayerHudComponent, 13900, 1, source, "radar", true) 
    setTimer(showChat, 13900, 1, source, true) 
else 
outputChatBox("Welcome back!", source, 0, 240, 0, false) 
fadeCamera(source, true) 
spawnPlayer (source, -3255.1701660156+math.random(0,3), 1838.9616699219+math.random(0,3), 9.8706741333008, 192.73875427246, math.random(265,312)) 
setCameraTarget(source, true) 
end 
end 
addEventHandler("onPlayerLogin", getRootElement(), intro) 

Link to comment
function intro(account) 
    --If he is new show the intro 
    if not (getAccountData(account,"Achievement: New Guy")) then 
        spawnPlayer (source, -3255.5166015625+math.random(0,0), 1848.876953125+math.random(0,0), 9.8706741333008, 178.27844238281, math.random(265,312)) 
        showPlayerHudComponent(source, "radar", false) 
        showChat(source, false) 
  
        fadeCamera(source, false) 
        setTimer(fadeCamera, 4500, 1, source, true) 
        setTimer(setElementPosition, 3000, 1, source, -3255.5166015625+math.random(0,0.5), 1848.876953125+math.random(0,1), 9.8706741333008, 178.27844238281) 
        setTimer(setElementRotation, 3000, 1, source, 0, 0, 178.27844238281) 
        setTimer(setPedAnimation, 4600, 1, source, "ped", "getup_front") 
        setTimer(setPedAnimation, 5750, 1, source, "ped", "IDLE_stance") 
        setTimer(setPedAnimation, 6200, 1, source, "ped", "WALK_civi") 
        setTimer(setCameraMatrix, 4000, 1, source, -3256.9641113281, 1833.8905029297, 13.224102973938, -3256.3107910156, 1850.1762695313, 9.8706741333008, 0, 0) 
      
        setTimer(setElementPosition, 13900, 1, source, -3255.1701660156+math.random(0,0), 1838.9616699219+math.random(0,0), 10.8706741333008, 192.73875427246) 
        setTimer(fadeCamera, 12000, 1, source, false) 
        setTimer(fadeCamera, 15000, 1, source, true) 
        setTimer(setCameraTarget, 14500, 1, source) 
  
        setTimer(showPlayerHudComponent, 13900, 1, source, "radar", true) 
        setTimer(showChat, 13900, 1, source, true) 
    else 
        outputChatBox("Welcome back!", source, 0, 240, 0, false) 
        fadeCamera(source, true) 
        spawnPlayer (source, -3255.1701660156+math.random(0,3), 1838.9616699219+math.random(0,3), 9.8706741333008, 192.73875427246, math.random(265,312)) 
        setCameraTarget(source, source) 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), intro) 

Link to comment
  • Moderators

You probably can use this event: onPlayerCommand

And check if the 1st parameter start with register. And check if the arguments the player used with that command will work.

And the best idea is to save it with setAccountData under the key "sawIntro" (set the value to 1). When the player logins or register, check if that data is 1 with getAccountData if not then he didn't saw the intro yet.

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