cars not spawning with createvehicle
#1

Код:
	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
Reply
#2

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

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.");
}

Reply
#4

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.");
        }
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)