HunT Posted April 6, 2011 Share Posted April 6, 2011 i have problem with outputChatBox 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 Link to comment
Castillo Posted April 6, 2011 Share Posted April 6, 2011 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
HunT Posted April 7, 2011 Author Share Posted April 7, 2011 Ty castillo O.T. For Respawnplayer? (race mode) respawn delay or what? Link to comment
Moderators Citizen Posted April 7, 2011 Moderators Share Posted April 7, 2011 Ty castillo 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
HunT Posted April 7, 2011 Author Share Posted April 7, 2011 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
Castillo Posted April 7, 2011 Share Posted April 7, 2011 could you show me your findPlayer function? Link to comment
HunT Posted April 7, 2011 Author Share Posted April 7, 2011 with this work. outputChatBox ( (thePlayer).. " Blow " ..getPlayerName(player), getRootElement(), 255, 255, 0, true) thePlayer=admin and player=player (or no ) ok Test in Server Link to comment
Castillo Posted April 7, 2011 Share Posted April 7, 2011 Look, what i gave you worked with normal getPlayerFromName and player elements, but i'am asking about how it works your function findPlayer, but i don't have idea why won't you post it here. Link to comment
HunT Posted April 8, 2011 Author Share Posted April 8, 2011 Omg Castillo sorry :l i copy only outputchatbox and no player = findplayer. The problem is player, theplayer = findplayer 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
proracer Posted April 8, 2011 Share Posted April 8, 2011 @Solidsnake: There is a function in votemanager/votemanager_polls.lua at line 684-703 (getPlayerByNamepart) Link to comment
Castillo Posted April 8, 2011 Share Posted April 8, 2011 proracer, i was asking for findPlayer not getPlayerByNamepart. Link to comment
HunT Posted April 9, 2011 Author Share Posted April 9, 2011 function findPlayer call players with namepart. . Yes.For respawn players in dm maps? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now