Help to fix that.
#1

Hello.I need some help,with that:

if(model != 481 && model != 510 && model != 509)//If not bikes
{
if(vehicleDB[vehicleid][gas] > 2)//if vehicle have more than 2 gas
{
SetPVarInt(vehicleid, "Gas", vehicleDB[vehicleid][prav]/10000);//Set pvar by get player vehicle distance:
if(vehicleDB[vehicleid][prav]/10000+0.1 >= GetPVarInt(vehicleid, "Gas"))//if all distance is 100 metres more than pvar player will lose 1 gas
{
vehicleDB[vehicleid][gas] -=0.1;// take from player 0.1 gas.

vehicleDB[vehicleid][prav]/10000 (with this i get all player run with vehicle distance).

And i get warning in this line:


C:\Documents and Settings\Owner\Desktop\SAMP Serveris\gamemodes\SF.pwn(4717) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


SetPVarInt(vehicleid, "Benzinas", vehicleDB[vehicleid][prav]/10000);

But for example what i want to do is that:I want if player run with vehicle 100 metres he lost 1 gas 200 metras 1 gas,and t.t.t......And i set a timer for 1 sec,who check if player 100 metres run with vehicle more than previously distance he lost 1 gas.But now please try fix my error,and please make script that what i sad.
Reply


Messages In This Thread
Help to fix that. - by budelis - 11.07.2011, 07:45
Re: Help to fix that. - by dowster - 11.07.2011, 07:59
Re: Help to fix that. - by budelis - 11.07.2011, 08:05
Re: Help to fix that. - by Patrik356b - 11.07.2011, 08:07
Re: Help to fix that. - by dowster - 11.07.2011, 08:11
Re: Help to fix that. - by alpha500delta - 11.07.2011, 09:28
Re: Help to fix that. - by budelis - 11.07.2011, 09:50
Re: Help to fix that. - by Patrik356b - 11.07.2011, 17:20
Re: Help to fix that. - by budelis - 11.07.2011, 17:40
Re: Help to fix that. - by Patrik356b - 11.07.2011, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)