02.04.2012, 01:17
Alright, Hey Guys.
So I'm Using this Code this sPetrol Function,
I'm not Sure if its the Problem. But.
This Coding is Acutally Making the Out of Place Textdraw 'Petrol: 100'.
Now Ive Tried for Hours on End Fixing this Thing.
And i Know its Possibly ganna be some Stupid Little Error,
Now the White Text 'Petrol:100' is Out of Place.
I Dont Understand How it Gets Their.
A: There's no Co-ords Set for There.
Could Anyone Please Shed Some Light?
if you need more code shown just ask.
Cheers,
So I'm Using this Code this sPetrol Function,
I'm not Sure if its the Problem. But.
This Coding is Acutally Making the Out of Place Textdraw 'Petrol: 100'.
Now Ive Tried for Hours on End Fixing this Thing.
And i Know its Possibly ganna be some Stupid Little Error,
Код:
new string[125];format(string,sizeof string,"Petrol:%i",Petrol[VehicleIdentificationNumber]);
Код:
public sPetrol() { for(new i=0;i<gMVehicles;i++) { if (IsCarRefueling[i]) continue; //stop when a player is already refuelling new VehicleIdentificationNumber = GetPlayerVehicleID(i); //getting vehicle ID if (GetPlayerVehicleSeat(i) == 0) { Petrol[VehicleIdentificationNumber] = Petrol[VehicleIdentificationNumber] -1; //lowering fuel value if (Petrol[VehicleIdentificationNumber]<1) //if fuel is empty { Petrol[VehicleIdentificationNumber] = 0; //setting fuel to 0 (else the timer will set it to -1 -2 -3 etc before removing player) RemovePlayerFromVehicle(i); //remove player out of vehicle GameTextForPlayer(i,"~r~You are out of ~w~fuel~r~!",5000,4); //show text } } new string[125];format(string,sizeof string,"Petrol:%i",Petrol[VehicleIdentificationNumber]); //preparing string with next fuel value //The Petrol:%i Here acutally is this 'Petrol: 100' out of place on the textdraw? TextDrawSetString(gPetrol[i],string); //updating textdraw } return 1; } public Refueling_Timer(playerid) { new VehicleIdentificationNumber = GetPlayerVehicleID(playerid); Petrol[VehicleIdentificationNumber] = Petrol[VehicleIdentificationNumber] = 100; IsCarRefueling[playerid] = 0; TextDrawSetString(gPetrol[playerid],"Petrol:100"); TogglePlayerControllable(playerid,1); }
I Dont Understand How it Gets Their.
A: There's no Co-ords Set for There.
Could Anyone Please Shed Some Light?
if you need more code shown just ask.
Cheers,