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

Wysłany: 2014-12-29, 08:59


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Witam mam problem poniewa? wyst?pi? b??d w tej linijce a nie wiem co jest ?le.Za pomoc piwko.



if getElementType(hitElement) == "player" then


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-29, 13:01


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Linijka sama z siebie jest dobrze u?o?ona, pewnie nie zdefiniowa?e? hitElement.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-29, 13:20


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Shuffle, To ca?y kod

function onFire(weaponammoammoInCliphitXhitYhitZhitElement)
    if weapon == weaponid then
        if getElementType("hitElement") == "player" then
            if shotmsg then
                outputChatBox(smsg .. getPlayerName(hitElement), 02550)
            end
            triggerServerEvent("onParalyze"hitElement)
        else
            if nshomsg then
                outputChatBox(nmsg255,0)
            end
        end
    end
end

addEventHandler"onClientPlayerWeaponFire"getRootElement(), onFire)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-29, 13:31


Terr9909

Skrypter LUA






Wiek: 26
Na forum: 4235 dni
Posty: 346
Nick w MP: Split

Piwa: 1043

Respekt: 182,8
Respekt: 182,8Respekt: 182,8

a funkcja si? zgubi?a?
if shotmsg then

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-29, 13:34


CrosRoad955







Wiek: 38
Na forum: 4176 dni
Posty: 6



Respekt: 50

 if weapon == weaponid then
nierozumiem tego ? weaponid nigdzie nie jest zdefiniowane czyli teoretycznie jezeli bron kt?r? strzelasz nieistnieje to ....

a b??d polega na tym ze zamiast:
 if getElementType("hitElement") == "player" then

u?yj:
 if getElementType(hitElement) == "player" then


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-29, 14:47


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

local shotmsg true --Show message when you shot someone
local nshomsg false --Show messagewhen your deagle don t shot a player

local smsg "* You shot player " --Messagewhen you shot someone (text player name)
local nmsg "* You didn t shot anyone" --Messagewhen you don t shot anyone

local weaponid 24

function onFire(weaponammoammoInCliphitXhitYhitZhitElement)
    if weapon == weaponid then
         if getElementType(hitElement) == "player" then
            if shotmsg then
                outputChatBox(smsg .. getPlayerName(hitElement), 02550)
            end
            triggerServerEvent("onParalyze"hitElement)
        else
            if nshomsg then
                outputChatBox(nmsg255,0)
            end
        end
    end
end

addEventHandler"onClientPlayerWeaponFire"getRootElement(), onFire)



Nadal jest b??d.
SS Z DB3 http://scr.hu/38t0/p8ttv

Postaw piwo autorowi tego posta
 

 
Tagi: getelementtype
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » getElementType 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