Jump to content

Table .


Recommended Posts

Posted

Hello Why This One Not Work? No Error's!

Client?

local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if ( GroveIDs [ getElementModel ( Ped ) ] ) then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  

  

Posted

The "if" check must be returning false.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Nothing :

local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if  ( GroveIDs [ getElementModel ( Ped ) ] ) then r 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
             else 
     return false; 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 

  

Posted

If Ped is defined, then it probably works fine - it correctly draws the text outside the screen :) You use screen width as Y coordinate and that is under the bottom of the screen.

-

Posted
local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if ( GroveIDs [ getElementModel ( Ped ) ] ) then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  

Where to you define that "Ped" (in the "if" line)?

Posted
If Ped is defined, then it probably works fine - it correctly draws the text outside the screen :) You use screen width as Y coordinate and that is under the bottom of the screen.

@ Ludo and CrystalMV : and about screen position on the dx i change it to another one but not work too?

Ped = createPed ( 105, -69.668449401855,1363.7633056641,1080.2109375 , -90 )

  

Posted

I just noticed, your table is wrong, use this:

local GroveIDs = 
    { 
        [ 105 ] = true, 
        [ 106 ] = true, 
        [ 107 ] = true 
    } 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
I just noticed, your table is wrong, use this:
local GroveIDs = 
    { 
        [ 105 ] = true, 
        [ 106 ] = true, 
        [ 107 ] = true 
    } 

Great thank's!

  

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Hello Why This One Not Work? No Error's!

Client?

local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if ( GroveIDs [ getElementModel ( Ped ) ] ) then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  
  
local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if getElementModel ( Ped ) == GroveIDs[1] or GroveIDs[2] or GroveIDs[3] then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  
  

or

I just noticed, your table is wrong, use this:
local GroveIDs = 
    { 
        [ 105 ] = true, 
        [ 106 ] = true, 
        [ 107 ] = true 
    } 

تذكر عند تصفحك للأنترنت قوله تعالى: (( وهو معكم أين ما كنتم والله بما تعملون بصير )) ا

Posted
Hello Why This One Not Work? No Error's!

Client?

local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if ( GroveIDs [ getElementModel ( Ped ) ] ) then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  
  
local GroveIDs = {105,106,107}     
function TeamName() 
local screenWidth, screenHeight = guiGetScreenSize ( ) 
        if getElementModel ( Ped ) == GroveIDs[1] or GroveIDs[2] or GroveIDs[3] then 
             dxDrawText("Grove",screenHeight - 30, screenWidth) 
    end 
end 
addEventHandler("onClientRender",root,TeamName) 
  
  

or

I just noticed, your table is wrong, use this:
local GroveIDs = 
    { 
        [ 105 ] = true, 
        [ 106 ] = true, 
        [ 107 ] = true 
    } 

Thank's but SolidSnake way easy can you help me in this?

server :

local GroveIDs = 
    { 
        [ 105 ] = true, 
        [ 106 ] = true, 
        [ 107 ] = true 
    }    
addEvent("SpawnWar",true) 
addEventHandler("SpawnWar",root, 
function ( Ped ) 
    if ( GroveIDs [ Ped ] ) then 
         spawnPlayer(source,2485,-1667,13.34375,90,Ped,0,20,getTeamFromName("Grove Street"))  
        end; 
    end 
) 
  
  

client :

triggerServerEvent ( "SpawnWar",localPlayer,getElementModel (  Ped  )) 

No errors and give me all arguments but not spawn the player :?

  

Posted

Try checking what "ped" returns server side.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Where do you get that message?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
  
  
  
local GroveIDs = 
  
    { 
  
        [ 105 ] = true, 
  
        [ 106 ] = true, 
  
        [ 107 ] = true 
  
    }    
  
addEvent("SpawnWar",true) 
addEventHandler("SpawnWar",root, 
function ( Ped ) 
    if ( GroveIDs [ Ped ] ) then 
    local asd = getTeamFromName("Grove Street") 
     if asd then 
         spawnPlayer(source,2485,-1667,13.34375,90,tonumber(Ped),0,20,asd)  
        end; 
     end 
    end 
) 
  

تذكر عند تصفحك للأنترنت قوله تعالى: (( وهو معكم أين ما كنتم والله بما تعملون بصير )) ا

Posted
  
  
  
local GroveIDs = 
  
    { 
  
        [ 105 ] = true, 
  
        [ 106 ] = true, 
  
        [ 107 ] = true 
  
    }    
  
addEvent("SpawnWar",true) 
addEventHandler("SpawnWar",root, 
function ( Ped ) 
    if ( GroveIDs [ Ped ] ) then 
    local asd = getTeamFromName("Grove Street") 
     if asd then 
         spawnPlayer(source,2485,-1667,13.34375,90,tonumber(Ped),0,20,asd)  
        end; 
     end 
    end 
) 
  

I try it and not work and i know this make no sense before take it -_-.

  

Posted

I try it and not work and i know this make no sense before take it -_-.

fadeCamera(source, true) 

?

تذكر عند تصفحك للأنترنت قوله تعالى: (( وهو معكم أين ما كنتم والله بما تعملون بصير )) ا

Posted

You must also use:

setCameraTarget 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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