Jump to content

[HELP] Please


1LoL1

Recommended Posts

Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"?

function d (player, cmd) 
outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

ERROR: attempt to concatenate local "cmd" (a nil value)

Link to comment
Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"?
function d (player, cmd) 
outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

ERROR: attempt to concatenate local "cmd" (a nil value)

Test :#

function d (cmd) 
outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

The source of this event is the player who tried to execute a command

Link to comment
Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"?
function d (player, cmd) 
outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

ERROR: attempt to concatenate local "cmd" (a nil value)

Test :#

function d (cmd) 
outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

The source of this event is the player who tried to execute a command

no your script is wrong but thanks i fixed.

function d (cmd) 
local f = getPlayerName(source) 
outputChatBox("Player "..f.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 

Link to comment
Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"?
function d (player, cmd) 
outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

ERROR: attempt to concatenate local "cmd" (a nil value)

Test :#

function d (cmd) 
outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 
  

The source of this event is the player who tried to execute a command

no your script is wrong but thanks i fixed.

function d (cmd) 
local f= getPlayerName(source) 
outputChatBox("Player "..f.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) 
end 
addEventHandler("onPlayerCommand", getRootElement(), d) 

LooL i Forgot Name Player , put easy ,

Let the other in time to the wiki , to alert

QPyMEFa.png

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