| Tematy otagowane jako: news |
| 1. [MTA] NEWS MTA - NOWA PRACA 4LIFE |
Zapraszam na kolejn? porcj? news?w z ostatniego tygodnia
https://youtu.be/KoGbluYoxmk |
| 2. [GTA SA] Cejot News vol.3 - Zemst |
| https://www.youtube.com/watch?v=IVZZCdEadME |
| 3. [PHP] 7.4 - News |
Cze??. 28 listopada tego roku (tj. 2019) odb?dzie si? premiera PHP 7.4. Mi?dzy innymi zostan? dodane nast?puj?ce funkcje:
- Arrow Functions 2.0. Nowy spos?b na pisanie kr?tszych funkcji.
PHP Code: | function array_values_from_keys($arr, $keys) {
return array_map(function ($x) use ($arr) { return $arr[$x]; }, $keys);
} |
?r?d?o: https://wiki.php.net/rfc/arrow_functions_v2
- Typed Properties 2.0. Ulepszona standaryzacja, kt?ra umo?liwi definiowanie typ?w w?a?ciwo?ci klasy.
PHP Code: | class User {
public int $id;
public string $name;
public function __construct(int $id, string $name) {
$this->id = $id;
$this->name = $name;
}
} |
?r?d?o: https://wiki.php.net/rfc/typed_properties_v2
- Null Coalescing Assignment Operator. Mo?na od razu poda? dane gdy zmienna zwr?ci nil przez dodanie do zmiennej , przyk?ad poni?ej:
PHP Code: | $variable = $zmienna ?? 'zapasowe'; |
?r?d?o: https://wiki.php.net/rfc/null_coalesce_equal_operator
- Wsparcie dla Weak References
?r?d?o: https://wiki.php.net/rfc/weakrefs |
| 4. Venturas News |
Witam, robi? frakcj? Venturas News lecz mam taki pewien problem, gdy wpisz? /vnews <text> wywala mi db3:
[img]http://www.wrzucajtu.pl/wrz/73cba6397f542bb2add98fad09af2376162.158.203.193mta-screen_2016-07-11_18-17-51.png[/img]
Kod:
[lua]
C-SIDE:
local screenW, screenH = guiGetScreenSize()
addEvent("oglos",true)
addEventHandler("oglos",root,
function (reason)
addEventHandler("onClientRender",root,info)
end
)
function info (reason)
dxDrawText(""..reason.."", screenW * 0.3536, screenH * 0.0111, screenW * 0.6391, screenH * 0.0648, tocolor(255, 254, 254, 254), 1.20, "default-bold", "center", "top", false, false, true, false, false)
end
function infor ()
removeEventHandler("onClientRender",root,info)
end
setTimer(infor,15000,1)
[/lua]
[lua]
S-SIDE:
local pojazdy = {
{983.91,1720.12,8.71,360,0,90},
{983.91,1725.12,8.71,360,0,90},
{983.91,1730.12,8.71,360,0,90},
{983.91,1735.12,8.71,360,0,90},
{983.91,1740.12,8.71,360,0,90},
}
for i,v in ipairs(pojazdy) do
local v = createVehicle(582,v[1],v[2],v[3],v[4],v[5],v[6])
setElementData(v,"pojazd_opis","Venturas News")
setElementData(v,"pojazd_paliwo",100)
setVehicleFrozen(v,true)
end
addEventHandler("onVehicleStartEnter",resourceRoot,
function (player)
local acc = getAccountName(getPlayerAccount(player))
if not isObjectInACLGroup("user.&q... |
| 5. San News |
Problem :
Klinet:
[lua]
x, y = guiGetScreenSize()
function ininstall()
Zapis_Window = guiCreateWindow((x/2)-150,(y/2)-200,300,400,"Panel San-News",false)
guiSetAlpha(Zapis_Window,255)
radio_bug=guiCreateRadioButton(0.1,0.04,0.4,0.1,"Wydarzenia",true,Zapis_Window)
radio_idea=guiCreateRadioButton(0.4,0.04,0.4,0.1,"Z Wysig?w",true,Zapis_Window)
radio_question=guiCreateRadioButton(0.7,0.04,0.4,0.1,"Z Adminami",true,Zapis_Window)
guiRadioButtonSetSelected(radio_idea,true)
main_memo = guiCreateMemo(0.05,0.15,0.92,0.605,"Napisz tu co sie staÓŻ",true,Zapis_Window)
zapis_memo = guiCreateMemo(0.0467,0.765,0.92,0.14,"",true,Zapis_Window)
button_send = guiCreateButton( 0.15,0.93,0.3,0.05,"Zapisz!",true,Zapis_Window)
button_cancel = guiCreateButton(0.55, 0.93,0.3,0.05,"Wyjdz",true,Zapis_Window)
guiSetVisible(Zapis_Window,false)
addEventHandler("onClientGUIClick",button_send,function()
if button_send==source then
send()
end
end)
addEventHandler("onClientGUIClick",button_cancel,function()
if button_cancel==source then
cancel()
guiSetVisible(Zapis_Window,false)
end
end)
end
addEventHandler("onClientResourceStart", getRootElement(),ininstall)
function visible()
if guiGetVisible(Zapis_Window)==true then
showChat(true)
sho... |
|