Jump to content

[help] outputChatBox


HunT

Recommended Posts

i have problem with outputChatBox :wink:

function trol (thePlayer, commandName, ...) 
     player, thePlayer = findPlayer(...) 
      if not player then 
        outputChatBox("* /wtf: player not found", thePlayer) 
      elseif isPedInVehicle(player) then 
        local vehicle = getPedOccupiedVehicle(player) 
  
        /-------------------------------------------------------/ 
  
 This -->       outputChatBox( getPlayerName(player)..  " trol "  ..(thePlayer), getRootElement(), 255, 255, 0, true) 
  
 /---------------------------------------------------------/ 
     end 
   end 
   addCommandHandler("wtf", trol) 

with this function outputChatBox "name player" trol "name player"

i want . . . "name admin" name function (example trol) "name player"

pliz :mrgreen:

Link to comment

Could you post findPlayer function?

  
function trol (thePlayer, commandName, ...) 
player = findPlayer(...) 
if not player then 
outputChatBox("* /wtf: player not found", thePlayer) 
elseif isPedInVehicle(player) then 
local vehicle = getPedOccupiedVehicle(player)  
outputChatBox( getPlayerName(thePlayer)..  " trol "  ..getPlayerName(player), getRootElement(), 255, 255, 0, true) 
    end 
end 
addCommandHandler("wtf", trol) 

Link to comment
  • Moderators
Ty castillo :D O.T. For Respawnplayer? (race mode) respawn delay or what?

No Solidsnake means this ( line3 ):

player = findPlayer(...) 

He wants that you show us the:

function findPlayer( blabla ) 
    blablabla 
end 

Link to comment

Castillo :| . . .Bad argument @ 'getPlayerName' attempt to concatenate a boolean value

with:

outputChatBox (getPlayerName(thePlayer) .. " msg " .. getPlayerName(player),getRootElement(), 255, 255, 0, true) 

why :?:

Link to comment

Omg Castillo sorry :l i copy only outputchatbox and no player = findplayer. The problem is player, theplayer = findplayer :D now work.And for respawn player in dm map?. . .player: admin respawn me . . Ok /cmd "name player" . . . respawn delay? Sorry for bad eng.

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