Call vehicles.
#6

ok i got it but it just calls random cars and not the ones i want to be able to call the ones with the names like

vehicle2 = addstaticvehicle etc
heres the code
Код:
dcmd_callcar(playerid, params[])
{
	new vehicleid = GetPlayerVehicleID(playerid);
	new s[128];
	new Float:X, Float:Y, Float:Z;
  if(sscanf(params, "s", vehicleid)) SendClientMessage(playerid, TEXT_COLOR, "USAGE: \"/callcar [carname]\"");
  else if(GetPlayerState(playerid) == 2) SendClientMessage(playerid, TEXT_COLOR, "You must be on foot to call your car.");
  else
  {
  	new string[70];
  		format(string, sizeof(string), "You have called car id: %s", s);
    GetPlayerPos(playerid, X, Y, Z);
		new Float:pX, Float:pY;
		GetXYInFrontOfPlayer(playerid, pX, pY, 3.0);
		SetVehiclePos(vehicleid, pX, pY, Z); //Vehicle ID being the actual vehicle ID number, not just 'vehicleid'
		SendClientMessage(playerid, 0x00FFFFAA, string);
    return 1;
}
return 1;
}
Reply


Messages In This Thread
Call vehicles. - by GreenHammy - 30.05.2010, 16:54
Re: Call vehicles. - by Conroy - 30.05.2010, 16:57
Re: Call vehicles. - by GreenHammy - 30.05.2010, 17:00
Re: Call vehicles. - by GreenHammy - 30.05.2010, 17:05
Re: Call vehicles. - by Conroy - 30.05.2010, 17:20
Re: Call vehicles. - by GreenHammy - 30.05.2010, 18:06
Re: Call vehicles. - by Conroy - 30.05.2010, 18:41
Re: Call vehicles. - by DJDhan - 30.05.2010, 18:44
Re: Call vehicles. - by Conroy - 30.05.2010, 18:46
Re: Call vehicles. - by GreenHammy - 30.05.2010, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)