24.02.2014, 12:54
hi im trying to make an array for vehicles information ie. name petrol petrol id and it keeps giving me the name of the car for the second string please help?
PHP код:
new Text:VehicleInformation[MAX_PLAYERS], EngineSystemsType[][] = {
{"Landstalker","Diesel",0}, {"Bravura","Petrol",1}, {"Buffalo",,"Petrol",1}};
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2 && oldstate == 1)
{
new string[128];
format(string,sizeof(string),"%s %s", EngineSystemsType[GetVehicleModel(GetPlayerVehicleID(playerid))-400],EngineSystemsType[GetVehicleModel(GetPlayerVehicleID(playerid))-400][1]);
TextDrawSetString(VehicleInformation[playerid],string);
TextDrawShowForPlayer(playerid,VehicleInformation[playerid]);
}
if(newstate == 1 && oldstate == 2)
{
TextDrawHideForPlayer(playerid, VehicleInformation[playerid]);
}
return 1;
}