Cars disapeared
#2

Quote:
Originally Posted by Kobatz
Посмотреть сообщение
I tried to make some cars only for Army Members,i did it good (i think) complied without any errors..but when i tried to test it IG i couldn't see any vehicle,all dismissed.
This is how i made this.
Код:
enum TeamCars
{
Army
}
@ the top
Код:
new Cars[TeamCars];
under

Then THIs:
Код:
Cars[Army] =  AddStaticVehicle(432,2795.45410156,-2417.37695312,13.73352051,90.00000000,-1,-1); //Rhino
To every car i want
and
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 2)
    {
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == Cars[Army] )
        {
            if(gTeam[playerid] != TEAM_ARMY)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You don't have keys for this vehicle!");
                 return 1;
            }
        }
        return 1;
    }
    return 1;
}
I think i made it good and i think the problem is in AddStaticVehicle .. (i'm using streamer).

Hope someone can help,thanks.
Try this:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 2)
    {
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == Cars[Army] )
        {
            if(gTeam[playerid] != TEAM_ARMY)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You don't have keys for this vehicle!");
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Cars disapeared - by Kobatz - 22.05.2011, 20:02
Re: Cars disapeared - by ddnbb - 22.05.2011, 21:38
Re: Cars disapeared - by Kobatz - 23.05.2011, 09:22
Re: Cars disapeared - by Mean - 23.05.2011, 09:42
Re: Cars disapeared - by Kobatz - 23.05.2011, 10:28
Re: Cars disapeared - by Mean - 23.05.2011, 16:19
Re: Cars disapeared - by Kobatz - 23.05.2011, 17:49
Re: Cars disapeared - by Mean - 23.05.2011, 17:57
Re: Cars disapeared - by Kobatz - 23.05.2011, 20:22
Re: Cars disapeared - by Bates - 23.05.2011, 20:56

Forum Jump:


Users browsing this thread: 1 Guest(s)