array help 3D/2D
#1

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(playeridnewstateoldstate)
{
  if(
newstate == && 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 == && oldstate == 2)
  {
    
TextDrawHideForPlayer(playeridVehicleInformation[playerid]);
  }
  return 
1;

Reply


Messages In This Thread
array help 3D/2D - by Pillhead2007 - 24.02.2014, 12:54
Re: array help 3D/2D - by Misiur - 24.02.2014, 13:02
Re: array help 3D/2D - by Pillhead2007 - 26.02.2014, 13:16

Forum Jump:


Users browsing this thread: 1 Guest(s)