Hej! Chcia?bym z bazy danych 'wyci?gn??' nick gracza, aby potem go por?wna? i pod dane nicki(zdefiniowane przeze mnie) podpisa? funkcje. Zrobi?em co? takiego, ale nie dzia?a.
Kod:
function greeting7Handler ()
local localPlayerName = mysql_query(handler,"SELECT * FROM users WHERE username = ? ",username)
local wynik = mysql_fetch_assoc(localPlayerName)
if wynik == "samel" then
addPedClothes ( source, "capzip", "cap", 16 )
outputChatBox("jestes wysmienity", source, 27, 89, 224, true)
elseif localPlayerName == "Samel12" then
addPedClothes ( source, "capzip", "cap", 16 )
outputChatBox(" dsdasd", source, 27, 89, 224, true)
else
outputChatBox(" nie jestes wysmienity!!1!1!!", source, 27, 89, 224, true)
end
end
addEvent( "onGreeting7", true )
addEventHandler( "onGreeting7", getRootElement(), greeting7Handler )