new gcar1 = AddStaticVehicle(492,2481.76928711,-1655.14123535,13.23549938,89.00000000,86,86); //Greenwood
new gcar2 = AddStaticVehicle(492,2490.54248047,-1655.33972168,13.23549938,88.99475098,86,86); //Greenwood
new gcar3 = AddStaticVehicle(492,2504.81640625,-1651.08117676,13.23549938,142.99475098,86,86); //Greenwood
new gcar4 = AddStaticVehicle(492,2472.94335938,-1655.05871582,13.23549938,88.99475098,86,86); //Greenwood
new gcar5 = AddStaticVehicle(487,2503.71435547,-1668.32397461,13.62807465,0.00000000,86,44); //Maverick
new gcar6 = AddStaticVehicle(413,2473.96093750,-1695.36181641,13.66538715,0.00000000,86,1); //Pony
new gcar7 = AddStaticVehicle(492,2483.19116211,-1686.29833984,13.23549938,88.99475098,86,86); //Greenwood
SetVehicleVirtualWorld(gcar1,2);
SetVehicleVirtualWorld(gcar2,2);
SetVehicleVirtualWorld(gcar3,2);
SetVehicleVirtualWorld(gcar4,2);
SetVehicleVirtualWorld(gcar5,2);
SetVehicleVirtualWorld(gcar6,2);
SetVehicleVirtualWorld(gcar7,2);
if(strcmp(cmdtext, "/exit", true) == 0)
{
if(InWar[playerid] == 1 || InGangWar[playerid] == 1)
{
if(InWar[playerid] == 1)
{
InWar[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,"You have left the deathmatch");
SetPlayerWorldBounds(playerid,20000.0000, -20000.0000, 20000.0000, -20000.0000);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
}
else if(InGangWar[playerid] == 1)
{
InGangWar[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,"You have left the minigame");
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not in a minigame or deathmatch.");
}
return 1;
}
Most likely the cars are spawning faster than the world around them when you teleport to that area (I'm guessing there is a "SetPlayerPos", or other location modifying code, somewhere). If this is the case they will fall through the ground and respawn on the closest "node path", i.e. defined piece of road, in grove street. To combat this there are a number of methods, one would be move the player there and change their virtual world a few moments later to ensure the world spawns before the vehicles.
|
if(listitem == 0)
{
gTeam[playerid] = TEAM_GROVE;
InGangWar[playerid] = 1;
SetPlayerColor(playerid,TEAM_COLOR_GROVE);
SetPlayerVirtualWorld(playerid,2);
SendClientMessage(playerid,COLOR_GREEN,"You have selected The Grove!");
SendClientMessage(playerid,COLOR_WHITE,"Objective: Kill other gangs");
SendClientMessage(playerid,COLOR_WHITE,"finds drugs, rob banks or just cruise with your homies");
SendClientMessage(playerid,COLOR_YELLOW,"Use /gcommands for all commands.");
switch(random(4))
{
case 0:
{
SetPlayerPos(playerid,2496.4500,-1708.5156,1014.7422);
SetPlayerInterior(playerid,3);
}
case 1:
{
SetPlayerPos(playerid,2492.5818,-1700.5641,1014.7661);
SetPlayerInterior(playerid,3);
}
case 2:
{
SetPlayerPos(playerid,2492.5183,-1702.5121,1018.3438);
SetPlayerInterior(playerid,3);
}
case 3:
{
SetPlayerPos(playerid,2497.7595,-1678.0848,13.3507);
}
}
switch(random(3))
{
case 0: SetPlayerSkin(playerid,105);
case 1: SetPlayerSkin(playerid,106);
case 2: SetPlayerSkin(playerid,107);
}
}
SetPlayerVirtualWorld(playerid,2);
That is not "later" (well, it is, but microseconds later) - that's just not enough time. I'm talking seconds, milliseconds at best.
|
if(dialogid == 13)
{
if(response)
{
if(listitem == 0)
{
gTeam[playerid] = TEAM_GROVE;
InGangWar[playerid] = 1;
SetPlayerColor(playerid,TEAM_COLOR_GROVE);
SendClientMessage(playerid,COLOR_GREEN,"You have selected The Grove!");
SendClientMessage(playerid,COLOR_WHITE,"Objective: Kill other gangs");
SendClientMessage(playerid,COLOR_WHITE,"finds drugs, rob banks or just cruise with your homies");
SendClientMessage(playerid,COLOR_YELLOW,"Use /gcommands for all commands.");
switch(random(4))
{
case 0:
{
SetPlayerPos(playerid,2496.4500,-1708.5156,1014.7422);
SetPlayerInterior(playerid,3);
}
case 1:
{
SetPlayerPos(playerid,2492.5818,-1700.5641,1014.7661);
SetPlayerInterior(playerid,3);
}
case 2:
{
SetPlayerPos(playerid,2492.5183,-1702.5121,1018.3438);
SetPlayerInterior(playerid,3);
}
case 3:
{
SetPlayerPos(playerid,2497.7595,-1678.0848,13.3507);
}
}
switch(random(3))
{
case 0: SetPlayerSkin(playerid,105);
case 1: SetPlayerSkin(playerid,106);
case 2: SetPlayerSkin(playerid,107);
}
}
if(listitem == 1)
{
gTeam[playerid] = TEAM_BALLAS;
InGangWar[playerid] = 1;
SetPlayerColor(playerid,TEAM_COLOR_BALLAS);
SendClientMessage(playerid,COLOR_PURPLE,"You have selected The Ballas!");
SendClientMessage(playerid,COLOR_WHITE,"Objective: Kill other gangs");
SendClientMessage(playerid,COLOR_WHITE,"finds drugs, rob banks or just cruise with your homies");
SendClientMessage(playerid,COLOR_YELLOW,"Use /gcommands for all commands.");
}
if(listitem == 2)
{
gTeam[playerid] = TEAM_VAGOS;
InGangWar[playerid] = 1;
SetPlayerColor(playerid,TEAM_COLOR_VAGOS);
SendClientMessage(playerid,COLOR_YELLOW,"You have selected The Vagos!");
SendClientMessage(playerid,COLOR_WHITE,"Objective: Kill other gangs");
SendClientMessage(playerid,COLOR_WHITE,"finds drugs, rob banks or just cruise with your homies");
SendClientMessage(playerid,COLOR_YELLOW,"Use /gcommands for all commands.");
}
if(listitem == 3)
{
gTeam[playerid] = TEAM_POLICE;
InGangWar[playerid] = 1;
SetPlayerColor(playerid,TEAM_COLOR_POLICE);
SendClientMessage(playerid,COLOR_BLUE,"You have selected The Poilce!");
SendClientMessage(playerid,COLOR_WHITE,"Objective: Bust /wanted gangs.");
SendClientMessage(playerid,COLOR_WHITE,"or just cruise around looking for trouble.");
SendClientMessage(playerid,COLOR_YELLOW,"Use /gcommands for all commands.");
}
SetTimerEx("WorldSetDelay",3000,0,"d",playerid);
}
}
return 1;
}
forward WorldSetDelay(playerid);
public WorldSetDelay(playerid)
{
SetPlayerVirtualWorld(playerid,2);
SendClientMessage(playerid,COLOR_YELLOW,"Success");
}
Oh, wait, YOU, spawn in the interior? In that case you will still have the problem I said when you go outside as the map will still take time to load.
|