Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-05-22, 18:30


hendryczek11







Wiek: 30
Na forum: 5044 dni
Posty: 49
Nick w MP: Heniek



Respekt: 50

Powracaj?c do moich problem?w z vip-ami pokazuj? wam kod, kt?ry zrobi?em z Hartem. Na pocz?tku Hart zastosowa? p?tl?, ale s? tam b??dy kt?rych nie umiemy rozwi?za?. Pomocy.





function getPlayerWeapons(player)
local weaponsTable = {}
    for index=0, 13 do
135        local weapon = getPedWeapon(player,index)
136        local ammo = getPedTotalAmmo(player,index)
137        if ammo > 0 then
            table.insert(weaponsTable, {weapon, ammo})
        end
    end
return weaponsTable
end

local weap = getPlayerWeapons(source)
outputChatBox(weap)

function onWasted (thePlayer)
    local thePlayer = source
    if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("VIP")) then
        local theWeapon = getPedWeapon (source)
        local weaponAmmo = getPedTotalAmmo (source)
        setTimer (setCameraTarget, 1250, 1, source, source)
        setTimer (spawnPlayer, 5000, 1, source, -2698.3813476563, 629.32623291016, 14.453125, 0, getPedSkin(source), 0, 0, getPlayerTeam(source))
        fadeCamera (source, false)
        setTimer (fadeCamera, 6000, 1, source, true)
        setTimer (giveWeapon, 6000, 1, source, theWeapon, weaponAmmo, true)
    else
        local amount = 0
        takePlayerMoney ( source, tonumber(amount)) 
        setTimer (setCameraTarget, 1250, 1, source, source)
        setTimer (spawnPlayer, 5000, 1, source, -2698.3813476563, 629.32623291016, 14.453125, 0, getPedSkin (source), 0, 0, getPlayerTeam(source))
        outputChatBox("Pobyt w szpitalu kosztowal cie 2000$", thePlayer,0,63,240,true)
        fadeCamera (source, false)
        setTimer (fadeCamera, 6000, 1, source, true) 
    end
end
addEventHandler ("onPlayerWasted", getRootElement(), onWasted)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-22, 18:58


Riot

3X






Wiek: 30
Na forum: 5870 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

Bo to jest ?le.


local weap = getPlayerWeapons(source)
outputChatBox(weap)


Po stronie serwera nie jest tak jak po stronie klienta, ?e mo?esz sobie byle gdzie da? getLocalPlayer() i odwo?a? si? do gracza. Po stronie serwera to source w zale?no?ci od eventu staje si? graczem, pojazdem, obiektem, markerem itd.

By sprawdzi? czy kod dzia?a - stw?rz prost? komend?, i tam umie?? ten kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-22, 19:39


hendryczek11







Wiek: 30
Na forum: 5044 dni
Posty: 49
Nick w MP: Heniek



Respekt: 50

function lol ()
local weap = getPlayerWeapons(source)
outputChatBox(weap)
        outputChatBox("iiiii?", thePlayer,0,63,240,true)
end
addCommandHandler("test", lol)


B??du nie ma, "iiiii?" te? nie ma i broni na chacie te? nie ma.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-22, 19:47


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

Jest taka funkcja jak getPlayerWeapons ja znam tylko GetPedWeapon

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-22, 19:57


hendryczek11







Wiek: 30
Na forum: 5044 dni
Posty: 49
Nick w MP: Heniek



Respekt: 50

Zmieni?em, ale nie pomog?o, ale co dziwne wg nie ma b??d?w...

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: respawn :: vip
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Respawn Vip Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku