[HELP]VehicleOwnership-/park command bug
#2

pawn Код:
COMMAND:park(playerid)
{

  if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command must be used only on your owned car");
  new vstring[64];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,sizeof(pName));
  format(vstring,sizeof(vstring),"/VehicleOwnership/%s.txt",pName);
  new vehicleid = GetPlayerVehicleID(playerid);

  if(VehicleInfo[vehicleid][vOwned] == true)
  {
     new Float:x,Float:y,Float:z;
     GetVehiclePos(vehicleid,x,y,z);
     VehicleInfo[vehicleid][vFloatX] = x;
     VehicleInfo[vehicleid][vFloatY] = y;
     VehicleInfo[vehicleid][vFloatZ] = z;
     dini_FloatSet(vstring,"VehFloatX",VehicleInfo[vehicleid][vFloatX]);
     dini_FloatSet(vstring,"VehFloatY",VehicleInfo[vehicleid][vFloatY]);
     dini_FloatSet(vstring,"VehFloatZ",VehicleInfo[vehicleid][vFloatZ]);
  }
  else return SendClientMessage(playerid,COLOR_RED,"This command must be used only on your own car");
  return true;
}
try it
Reply


Messages In This Thread
[HELP]VehicleOwnership-/park command bug - by Cjgogo - 02.10.2011, 14:46
Re: [HELP]VehicleOwnership-/park command bug - by Pharrel - 02.10.2011, 15:01
Re: [HELP]VehicleOwnership-/park command bug - by Cjgogo - 02.10.2011, 15:35
Re: [HELP]VehicleOwnership-/park command bug - by Dripac - 02.10.2011, 15:37
Re: [HELP]VehicleOwnership-/park command bug - by Cjgogo - 02.10.2011, 15:38
Re: [HELP]VehicleOwnership-/park command bug - by Pharrel - 02.10.2011, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)