SA-MP Forums Archive
cars not spawning with createvehicle - 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: cars not spawning with createvehicle (/showthread.php?tid=579799)



cars not spawning with createvehicle - NoahF - 30.06.2015

Код:
	if(dialogid == DIALOG_CARSIRENS) //Cheetah\nInfernus\nElegy\nTaxi\nTurismo\nBanshee\nBullet\nJester
	{
	    if(response)
	    {
			if(listitem == 0)
	        {
				new Float:x, Float:y, Float:z;
				GetPlayerPos(playerid, x, y, z);
				CreateVehicle(415, x+5.0, x+2.0, z, 82.2873, 0, 0, -1, 1);
				SendClientMessage(playerid, COLOR_GREEN, "Unmarked Cheetah spawned.");
			}
only posted one listitem because the rest are the same, just with different vehicle model ids
I get the clientmessage but the cars do not spawn


Re: cars not spawning with createvehicle - MohammedZ - 30.06.2015

Quote:

if(dialogid == DIALOG_CARSIRENS) //Cheetah\nInfernus\nElegy\nTaxi\nTurismo\nBanshee\n Bullet\nJester
{
if(response)
{
if(listitem == 0)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(415, x+5.0, y+2.0, z, 82.2873, 0, 0, -1, 1);
SendClientMessage(playerid, COLOR_GREEN, "Unmarked Cheetah spawned.");
}

If this helped +rep


Re: cars not spawning with createvehicle - kyriakos587 - 30.06.2015

I think this will work

Quote:

f(dialogid == DIALOG_CARSIRENS) //Cheetah\nInfernus\nElegy\nTaxi\nTurismo\nBanshee\n Bullet\nJester
{
if(response)
{
if(listitem == 0)
{
new Float: x , Float:y, Float:z,car[MAX_PLAYERS];
GetPlayerPos(playerid, x, y, z);
car[playerid] = CreateVehicle(415, x+5.0, x+2.0, z, 82.2873, 0, 0, -1, 1);
PutPlayerInVehicle(playerid,car[playerid],0);
SendClientMessage(playerid, COLOR_GREEN, "Unmarked Cheetah spawned.");
}




Re: cars not spawning with createvehicle - kloning1 - 30.06.2015

pawn Код:
if(dialogid == DIALOG_CARSIRENS) //Cheetah\nInfernus\nElegy\nTaxi\nTurismo\nBanshee\nBullet\nJester
{
    if(response)
    {
        if(listitem == 0) // cetah
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerPos(playerid, x, y, z);
            GetPlayerFacingAngle(playerid, a)
            CreateVehicle(415, x+5.0, x+2.0, z, a, 0, 0, -1, 1);
            SendClientMessage(playerid, COLOR_GREEN, "Unmarked Cheetah spawned.");
        }
        if(listitem == 1) //  infernus
        {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            GetPlayerFacingAngle(playerid, a)
            CreateVehicle(411, x+5.0, x+2.0, z, a, 0, 0, -1, 1);
            SendClientMessage(playerid, COLOR_GREEN, "Unmarked Infernus spawned.");
        }