Jump to content

Alguna forma..


Recommended Posts

Hola hay alguna forma de reemplazar tantos ifs .. else..

if (ap == 10) then 
            givePlayerMoney(player, 10000) 
 outputChatBox("[iNFO]BONUS: $10.000",player,0,255,255) 
        elseif (ap == 20) then 
 givePlayerMoney(player, 20000) 
 outputChatBox("[iNFO]BONUS: $20.000",player,0,255,255) 
elseif (ap == 30) then 
 givePlayerMoney(player, 30000) 
 outputChatBox("[iNFO]BONUS: $30.000",player,0,255,255) 
end  
end 

Gracias :c

Link to comment

prueva con algo como esto

no estoi seguro de lo que ise xD

if ( ap ) then 
data= tonumber((ap*100)) --- si ap = 10 te va a dar 10000 si es igual a 20 te va a dar 20000 y asi  ... --- 
givePlayerMoney(player, data) 
 outputChatBox("[iNFO]BONUS: $"..data,player,0,255,255) 
end  
end 

Link to comment
prueva con algo como esto

no estoi seguro de lo que ise xD

if ( ap ) then 
data= tonumber((ap*100)) --- si ap = 10 te va a dar 10000 si es igual a 20 te va a dar 20000 y asi  ... --- 
givePlayerMoney(player, data) 
 outputChatBox("[iNFO]BONUS: $"..data,player,0,255,255) 
end  
end 

Si pero lo que necesito es especificamente de 10 en 10 o de 20 en 20 pero eso me da plata bonus en todos los arrestos

Link to comment
  • Recently Browsing   0 members

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