Request about Private Cars
#1

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.
Reply
#2

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;
}
Reply
#3

Thanks )
and how did i Save Tuning?
Reply
#4

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)