Jump to content
  • 0

O intrebare .


leon

Question

Am incercat sa fac sa ii dea bani unui player cata viata are masina, da imi da o eroare si nu stiu cum sa o rezolv :(

new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    GivePlayerMoney(playerid, health);
warning 213: tag mismatch
E la linia cu
GivePlayerMoney(playerid, health);

Stie cineva ?

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Nu cred ca merge sa faci asa..si daca ar merge ar trebuii sa arate cam asa

new health;
new veh = GetPlayerVehicleID(playerid);
health =  GetVehicleHealth(veh, health);

Merge cu  floatround( FloatName );

Ex:

    new Float:vhealth;

    new veh = GetPlayerVehicleID(playerid);

    GetVehicleHealth(veh, vhealth);

    GivePlayerMoney(playerid, floatround( vhealth ));

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

strval returneaza valoarea continutului unui string.

floatround returneaza valoarea intreaga a unui float.

GetVehicleHealth returneaza 0 daca masina nu exista,1 daca masina exista.(sau posibil sa returneze 0 oricand)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.