Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Je?eli si? nie myl? to t? komend? dajesz punkty premium, a dalsze post?powania w sprawie nadania musisz Sam znale??
addCommandHandler ( "pp" , function( plr , cmd , cel , kwota )
if getAdmin ( plr , 4 ) then
if not cel or not tonumber ( kwota ) then
outputChatBox ( "* U?ycie: /pp <nick/ID> <ilosc pp>" , plr )
return
end
kwota = tonumber ( kwota )
local target = exports [ "ogrpg-core" ]: findPlayer ( plr , cel )
if not target then
triggerClientEvent ( plr , 'onClientAddNotification' , plr , "Nie znaleziono podanego gracza!" , 'warning' )
return
end
uid = getElementData ( target , "player:uid" )
outputChatBox ( "Otrzyma?e? " .. kwota .. " punkt?w premium od " .. getPlayerName ( plr ), target , 0 , 255 , 0 , true )
outputServerLog ( uid .. " Otrzyma? " .. kwota .. " od " .. getPlayerName ( plr ).. " (" .. getPlayerSerial ( plr ))
exports [ "ogrpg-db" ]: dbSet ( "update ogrpg_users set pp=pp+? where id=? limit 1" , kwota , uid )
outputChatBox ( "Nada?e? " .. kwota .. " punkt?w premium dla " .. getPlayerName ( target ), plr , 0 , 255 , 0 , true )
end
end )
A, doda? organizacj? do MySQL'a to tym sposobem...
Wchodz?c do tabeli `ogrpg_organization_list`
Uzupe?niasz tabele nast?puj?co
ID - Po kolei nadawaj liczby dodawanych organizacji
Name - Nazwa organizacji
createdate - Aktualna data jak i godzina
Spawn - 0, 0, 0