Hop til indhold
Stavox

wepName() & wepPrice()


Xean -.-

Recommended Posts

2 funktioner som kan bruges til en gunshop.

 

entity:wepName()

Funktion:

function string entity:wepName()
{
    return This:isShipment() ? This:shipmentName() : "Udsolgt"
}

 

Brug:

print(Ranger:wepName())

 

 

entity:wepPrice()

Funktion:

function number entity:wepPrice()
{
    return This:shipmentPrice()
}

 

Brug:

local Profit = 3500
print(Ranger:wepPrice() + Profit)

Du kan også ændre funktionen til at retunere "shipmentPrice() + Profit", så du ikke skal +'se profitten til som vidst i eksemplet.

Link til kommentar
Del på andre sites

Arkiveret

Dette emne er nu arkiveret og er lukket for yderligere svar

×
×
  • Tilføj...

COOKIE- OG PRIVATLIVSPOLITIK PÅ STAVOX.DK

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privatlivspolitik - Vilkår for brug.