Jump to content

Vreau sa invat script.


Drano

Recommended Posts

nu stiu bine engleza mane :)) cum sa invat de acolo?:))

Pai stii cum faci ? Folosesti Google Translate unde nu stii ce inseamna , de exemplu :

getPedArmour

-- get - obtine

-- Ped - jucator, SKIN

-- Armour = armura

EX 2 :

  
function mesajMoarte (thePlayer) ------function - motorul scriptului  /  thePlayer -- este pentru local adica doar tie iti arata 
if isPedDead (thePlayer)  then  ----- if - daca / isPedDead (thePlayer ) - esteJucatorMort ( Jucatorul ) / then - atunci  
outputChatBox ( "You're dead... prepare to spawn.", thePlayer ) ---outputChatBox - nu prea are rost traducerea aici . da mesaj pe chat  
end -- sfarsitul functiei. 
  

este foarte simpu sunt cuvinte din engleza legate intre ele .

Link to comment
nu stiu bine engleza mane :)) cum sa invat de acolo?:))

Pai stii cum faci ? Folosesti Google Translate unde nu stii ce inseamna , de exemplu :

getPedArmour

-- get - obtine

-- Ped - jucator, SKIN

-- Armour = armura

EX 2 :

  
function mesajMoarte (thePlayer) ------function - motorul scriptului  /  thePlayer -- este pentru local adica doar tie iti arata 
if isPedDead (thePlayer)  then  ----- if - daca / isPedDead (thePlayer ) - esteJucatorMort ( Jucatorul ) / then - atunci  
outputChatBox ( "You're dead... prepare to spawn.", thePlayer ) ---outputChatBox - nu prea are rost traducerea aici . da mesaj pe chat  
end -- sfarsitul functiei. 
  

este foarte simpu sunt cuvinte din engleza legate intre ele .

Si cand o sa fie chemata functia 'mesajMoarte' ? Inca ceva, recomand sa nu folosesti nume in romana pt. functii... face scripturile urate.

Link to comment
nu stiu bine engleza mane :)) cum sa invat de acolo?:))

Pai stii cum faci ? Folosesti Google Translate unde nu stii ce inseamna , de exemplu :

getPedArmour

-- get - obtine

-- Ped - jucator, SKIN

-- Armour = armura

EX 2 :

  
function mesajMoarte (thePlayer) ------function - motorul scriptului  /  thePlayer -- este pentru local adica doar tie iti arata 
if isPedDead (thePlayer)  then  ----- if - daca / isPedDead (thePlayer ) - esteJucatorMort ( Jucatorul ) / then - atunci  
outputChatBox ( "You're dead... prepare to spawn.", thePlayer ) ---outputChatBox - nu prea are rost traducerea aici . da mesaj pe chat  
end --- acesta este de la " IF " mereu functia " if " are nevoie de inca un end . 
end -- sfarsitul functiei. 
  

este foarte simpu sunt cuvinte din engleza legate intre ele .

Si cand o sa fie chemata functia 'mesajMoarte' ? Inca ceva, recomand sa nu folosesti nume in romana pt. functii... face scripturile urate.

Eu am dat un exemplu , acolo poate sa puna ce vrea el , DeadMessage ..etc. Eu nu folosesc romana absolut de loc in scripturi dar ca sa inteleaga el .

Link to comment
Si lipseste eventHandleru :lol:

Nu are nevoie de event .

Si atunci cum/ce/cine cheama functia ?

Da am gresit :P le mai incurc ca nu ma pricep prea bine in partea asta adica vroiam sa fac un mesaj de moarte dar trebuia folosit.

  
function DeadMessage (thePlayer)  
outputChatBox ( "You're dead... prepare to spawn.", thePlayer ) 
guiCreateStaticImage( x, y, Sx, Sy, "name.png", false ) 
end 
addEventHandler("onClientPedWasted", getRootElement(), DeadMessage) 
  

Eu m-am complicat din cauza ca am crezut ca isPedDead are cam aceasi functie dar nup.

Eventual la ce am facut eu mai sus merge o comanda sau un trigger pe buton.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...