Problem with vehicle respawning? or what
#1

Hey,

I have made this little gangwar minigame. You enter it by typing /gangwars.
It has cars, objects(set only in world2).

Theres a little problem that I can't seem to figure out.
The problem is (sometimes) when I enter (/gangwars) the cars are like this:

http://imageshack.us/photo/my-images/811/samp284pa.png/

This doesn't always happen sometimes I join and everything they are like this:

http://imageshack.us/photo/my-images/828/samp285o.png/

Thats what they are supposed to look like.
And as I mentioned above if you enter it's (sometimes) fine but then if you type /exit and re-join it again , /gangwars. They are like the first picture I showed.

This is really annoying and I can't seem to figure out what it's wrong, I only thing I know is, maybe it's related to vehicle respawning time.

I will give you some more info , including codes:
pawn Код:
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);
Thats the cars code and they are set in world 2 like I said.
And this is the exit.
pawn Код:
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;
    }
Other info:

I have objects at the same place and vehicles, in world 0.

Anyone know the problem? If you want more information just ask me , including code. I don't mind I would just like this to be fixed.

Thanks.
Reply


Messages In This Thread
Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 12:53
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 13:02
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 13:51
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 14:33
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 15:49
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 18:27
Re: Problem with vehicle respawning? or what - by Jay. - 20.07.2011, 19:53

Forum Jump:


Users browsing this thread: 4 Guest(s)