Hallo,
wie bekomm ich es hin das mein Rank 4 "Kanzler" und mein Rank 5 "President" heißt. Bin langsam am verzweifeln -.-
Lua
function pchat_func ( player, cmd, ... )
local parametersTable = {...}
local stringWithAllParameters = table.concat( parametersTable, " " )
if isPresident ( player ) then
if stringWithAllParameters == nil then
triggerClientEvent ( player, "infobox_start", getRootElement(), "\nBitte einen\nText eingeben!", 5000, 125, 0, 0 )
else
local rang = tonumber(getElementData ( player, "factionRank" ))
if rang == 4 then
rank = "Kanzler"
elseif rang == 5 then
rank = "President"
end
outputChatBox ( "(( "..rank.." "..getPlayerName(player)..": "..stringWithAllParameters.." ))", getRootElement(), 255, 255, 255 )
end
else
triggerClientEvent ( player, "infobox_start", getRootElement(), "\nDu bist kein\n Politiker!", 5000, 125, 0, 0 )
end
end
addCommandHandler ("p", pchat_func )
Alles anzeigen