I want to learn LUA on RP script, thats why I ask on this forum.
Friends:
addEvent( "social:message", true )
addEventHandler( "social:message", root,
function( message )
local accountID = getElementData( client, "account:id" )
if accountID and friends[ accountID ] then
[u][b] if mysql:query_free("UPDATE accounts SET friendsmessage = '" .. mysql:escape_string(message) .. "' WHERE id = " .. mysql:escape_string(accountID) ) then[/u][/b]
friends[ accountID ].message = message
notifyFriendsOf( client, accountID, "social:message", message )
triggerClientEvent( client, "social:message", client, accountID, message )
end
end
end
)
lses:
function playerDeath(totalAmmo, killer, killerWeapon)
...(anothercode)...
local affected = { }
table.insert(affected, source)
local killstr = ' died'
if (killer) then
[u][b]killstr = ' got killed by '..getPlayerName(killer).. ' ('..getWeaponNameFromID ( killerWeapon )..')'[/b][/u]
table.insert(affected, killer)
end