11.07.2011, 07:45
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.
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.