Jump to content

login message


[DMC]

Recommended Posts

LOOK AT 3rd Post

function addPlayer() 
local playeraccount = getPlayerAccount(source) 
if not isGuestAccount(playeraccount) then 
local accountname = getAccountName(playeraccount) 
CheckPlayer = executeSQLSelect ( "PlayersData", "accountname", "accountname = '" .. accountname .. "'" ) 
if ( type( CheckPlayer ) == "table" and #CheckPlayer == 0 ) or not CheckPlayer then  
executeSQLInsert ( "PlayersData", "'".. accountname .."','0','0','0','0','FF0000','00FF00','None','None/None','I love DMC','0','0'" ) 
end 
end 
local playeraccount = getPlayerAccount(source) 
if not isGuestAccount(playeraccount) then 
local accountname = getAccountName(playeraccount) 
local data = executeSQLQuery("SELECT * FROM PlayersData where accountname = '" .. accountname .. "'") 
outputChatBox(getPlayerName(source).. " login and says: ".. data[1]["LoginMsg"] .."!",root,0,255,0,true) 
setElementData(source,"ageNsex",data[1]["AgeNSex"]) 
setElementData(source,"contact",data[1]["Contact"]) 
setElementData(source,"message",data[1]["LoginMsg"]) 
setElementData(source,"skin",data[1]["Skin"]) 
setElementData(source,"NC",data[1]["NameC"]) 
setElementData(source,"CC",data[1]["ChatC"]) 
setElementData(source,"CarColor",data[1]["CarColor"]) 
end 
end 
addEventHandler("onPlayerLogin",getRootElement(), addPlayer) 

Edited by Guest
Link to comment

You want this

outputChatBox(getPlayerName(source).. " login and says: ".. data[1]["LoginMsg"] .."!",root,0,255,0,true) 

output to be printed after 2 secs?

if yes then use,

setTimer(outputChatBox,2000,1,getPlayerName(source).. " login and says: ".. data[1]["LoginMsg"].."!",getRootElement(),0,255,0,true) 

Link to comment

srry this is not needed at all, i will explain my situation

My friend solidsnake/castillo

made a script for me that alows A player to login to his nick only

not any other names

But when someone does a login to an other name its still saying outPutChatbox :cry:

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