SA-MP Forums Archive
How i can.... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How i can.... (/showthread.php?tid=253565)



How i can.... - Renks554 - 07.05.2011

How i can do like this , when i use / sхidukid ( /vehicles ) , i want i spawn in the car when i do that ..

pawn Код:
case 2:
            {
            switch(listitem)
                {
                    case 0:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(411,X+2,Y,Z,0.0,0,0, 0), "Infernus");
                        }
                    }
                    case 1:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(481,X+2,Y,Z,0.0,0,0, 0), "BMX");
                        }
                    }
                    case 2:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(562,X+2,Y,Z,0.0,0,0, 0), "Elegy");
                        }
                    }
                    case 3:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(402,X+2,Y,Z,0.0,0,0, 0), "Buffalo");
                        }
                    }
                    case 4:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(522,X+2,Y,Z,0.0,0,0, 0), "NRG-500");
                        }
                    }
                    case 6:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(520,X+2,Y,Z,0.0,0,0, 0), "Hydra");
                        }
                    }
                    case 5:
                        {
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid, X,Y,Z);
                        {
                            SetVehicleNumberPlate(CreateVehicle(451,X+2,Y,Z,0.0,0,0, 0), "Turismo");
                        }
                    }
                }
            }
        }
    }
    return 1;
}
SORRY FOR BAD ENGLISH !


Re: How i can.... - Daddy Yankee - 07.05.2011

Try this

Код:
case 0:
{
    new veh1;
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    {
        veh1 = SetVehicleNumberPlate(CreateVehicle(411,X+2,Y,Z,0.0,0,0, 0), "Infernus");
        PutPlayerInVehicle(playerid, veh1, 0);
    }
}
And so on


Re: How i can.... - Renks554 - 07.05.2011

... i try