Request about Private Cars - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Request about Private Cars (
/showthread.php?tid=304033)
Request about Private Cars -
DexToxz - 16.12.2011
Hello every one!!
can you help me please??
1.How Can i add To This Script (
https://sampforum.blast.hk/showthread.php?tid=283929) Tuning PArts and Spawn car cmd like : if i do /mycar the car will Comes to me.
Re: Request about Private Cars -
TyThaBomb - 16.12.2011
Try that out.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/mycar", true))
{
if(IsPlayerConnected(playerid))
{
new Name[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerName(playerid,Name,sizeof(Name));
if(!strcmp(Name, "FireCat", true)) //Check the Player Name
{
SetVehiclePos(FireCat, X+3, Y, Z); //FireCat = vehicleid. || X = Position X || Y = Position Y || Z = Position Z.
}
return 1;
}
}
return 0;
}
Re: Request about Private Cars -
DexToxz - 16.12.2011
Thanks
)
and how did i Save Tuning?
Re: Request about Private Cars -
TyThaBomb - 16.12.2011
pawn Код:
public OnGameModeInit()
{
Tyler = AddStaticVehicleEx(562,1517.5579,-694.3458,94.4156,88.3209,158,158, 6000000);
AddVehicleComponent(Tyler, 1034);
AddVehicleComponent(Tyler, 1172);
AddVehicleComponent(Tyler, 1040);
AddVehicleComponent(Tyler, 1036);
AddVehicleComponent(Tyler, 1079);
AddVehicleComponent(Tyler, 1148);
AddVehicleComponent(Tyler, 1038);
And when it respawns
pawn Код:
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == Tyler)
{
AddVehicleComponent(Tyler, 1034);
AddVehicleComponent(Tyler, 1172);
AddVehicleComponent(Tyler, 1040);
AddVehicleComponent(Tyler, 1036);
AddVehicleComponent(Tyler, 1079);
AddVehicleComponent(Tyler, 1148);
AddVehicleComponent(Tyler, 1038);