Problem spawning car at right location
#1

Hi guys.
My experience in scripting isn't so well. That's why I have this problem.

I want this vehicle to spawn here.

Код:
case 0: // Bobcat
        	    {
                     if(GetPlayerScore(playerid) < 0) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose a special vehicle", "{FFED69}0 Score: Bobcat\n{FFE100}500 Score: Hotknife\n{FFC400}1000 Score: Enforcer\n{FFA200}1500 Score: Trashmaster\n{FF7700}1500 Score: Bus\n{FF3C00}2000 Score: NRG-500\n{E80000}2000 Score: Combine Harvester\n{E80074}3000 Score: Dumper\n{00FBFF}VIP: Vortex", "Purchase", "Cancel");
        	         new Float:up[3], carid;
        	         SetPlayerPos(playerid, 2904.16187, -3198.61792, 107.49332);
                     GetPlayerPos(playerid, up[0], up[1], up[2]);
                     new CurrentVeh = GetPlayerVehicleID(playerid);
                     DestroyVehicle(CurrentVeh);
                     carid = CreateVehicle(422, up[0]+2, up[1]+2, up[2], 0, -1, -1, 0);
                     LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
                     SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
                     SendClientMessage(playerid, 0x20C92EFF, "You spawned a Bobcat.");
                     PutPlayerInVehicle(playerid, carid, 0);
        	    }
But it doesn't. Because of this.

Код:
public OnPlayerSpawn(playerid)
{
   	SetPlayerPos(playerid, 2660.3000488281, -1458.6999511719, 79.400001525879);
   	SetPlayerSkin(playerid, 29);
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose a special vehicle", "{FFED69}0 Score: Bobcat\n{FFE100}500 Score: Hotknife\n{FFC400}1000 Score: Enforcer\n{FFA200}1500 Score: Trashmaster\n{FF7700}1500 Score: Bus\n{FF3C00}2000 Score: NRG-500\n{E80000}2000 Score: Combine Harvester\n{E80074}3000 Score: Dumper\n{00FBFF}VIP: Vortex", "Purchase", "Cancel");
	SetPlayerSumoTime(playerid, 0);
	SetPlayerColor(playerid, 0xA8E6FFFF);
	return 1;
}
The setplayerpos is a position just for the background on the vehicle select, watching over town. But as soon as I select a vehicle, it spawns me there too. And that's fucked up.

If anyone can help me, please do so
Reply


Messages In This Thread
Problem spawning car at right location - by CrazyManiac - 03.05.2015, 12:19
Re: Problem spawning car at right location - by CrazyManiac - 03.05.2015, 12:28
Re: Problem spawning car at right location - by CrazyManiac - 03.05.2015, 14:48
Re: Problem spawning car at right location - by Threshold - 03.05.2015, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)