Jump to content

[ HELP ] Teleports


Dinossauro

Recommended Posts

Hello friends,

I have a resource to teleport.

I have 4 arenas, arena1, arena2, etc. and 3 drops.

I've done the command, but I wanted when I type in / arena1 appears is: "The player Dino went to the arena a go too (/ arena1)

I tried but could not, look at the code:

function arenawarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para a Arena 1, espera alguém também se juntar!", source, 0, 255, 0 ) 
format(string, sizeof(string), "%s Foi para a Arena 1 || Vá tambem: ( /arena1 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "arena1", arenawarp ) 
  
function arenawarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para a Arena 2, espera alguém também se juntar!", source, 0, 255, 0 ) 
format(string, sizeof(string), "%s Foi para a Arena 2 || Vá tambem: ( /arena2 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "arena2", arenawarp ) 
  
function arenawarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para a Arena 3, espera alguém também se juntar!", source, 0, 255, 0 ) 
format(string, sizeof(string), "%s Foi para a Arena 3 || Vá tambem: ( /arena3 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "arena3", arenawarp ) 
  
function arenawarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para a Arena 4, espera alguém também se juntar!", source, 0, 255, 0 ) 
format(string, sizeof(string), "%s Foi para a Arena 4 || Vá tambem: ( /arena4 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "arena4", arenawarp ) 
  
function dropwarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para o Drop 1!", source, 0, 255, 0 ) 
    format(string, sizeof(string), "%s Foi para o Drop 1 || Vá tambem: ( /drop1 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "drop1", dropwarp ) 
  
function dropwarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para o Drop 2!", source, 0, 255, 0 ) 
format(string, sizeof(string), "%s Foi para o Drop 2 || Vá tambem: ( /drop2 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "drop2", dropwarp ) 
  
function dropwarp (source) 
    setElementPosition ( source, -2339, -1597, 486 ) 
    outputChatBox ( "Tu foste para o Drop 3!", source, 0, 255, 0 ) 
    format(string, sizeof(string), "%s Foi para o Drop 3 || Vá tambem: ( /drop3 )", pname); 
SendClientMessageToAll(Amarelo, string); 
  
end 
addCommandHandler ( "drop3", dropwarp ) 

You are in Portuguese, because I'm Portuguese, it's all working, except to appear to everyone: 'The player dino was go to the arena .. "

HELP-ME !

Link to comment

You're messing Lua with Pawn lol

Change:

format(string, sizeof(string), "%s Foi para o Drop 3 || Vá tambem: ( /drop3 )", pname); 
SendClientMessageToAll(Amarelo, string); 

And all repeats and write this:

outputChatBox( getPlayerName( source ) .. ' Foi para o Dop 3 || Vá também: ( /drop3 )', root, 0, 255, 255, true ); 
  

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