help me pls
#1

hey boys
Can some one of you help me with something i made teams grove street and Police and i made cars that can be used only from they but it wont work Police team cant use police car and grove street can use police car and not grove street car i tried to change teams but still wont work can some one give me pawno please



Sorry for my bad english xD :P
Reply
#2

Well, If you are making a car in one team, Make sure you use DEBUG,

And also theres have a tutorial in ******* that showing how to make a team characters,Team Car, Check below the video

[ame]http://www.youtube.com/watch?v=4Qe6NbLm5bc[/ame]
Reply
#3

okay thanks im checking video , do you know anything for factions to creat one ?
Reply
#4

I'm not going to create a whole script just so you can fix this.
Post your teams and car teams codes.
Reply
#5

lol did i asked you i said some one who can help me not script =_=
Reply
#6

Without code, is hard to help you
Reply
#7

okay here you go


Quote:

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[Police] )
{
if(gTeam[playerid] != 1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
return 1;
}
}
if(CarCheck == Cars[GroveStreet] )
{
if(gTeam[playerid] != 2)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
return 1;
}
}
return 1;
}
return 1;
}


police team got number 2 and grove got number 1
Reply
#8

Help me please
Reply
#9

pawn Код:
new ownedcarteam[MAX_VEHICLES];
new tempvarforcar;

OnGameModeInit()
{
  //blabla rest of the code
  tempvarforcar =  CreateVehicle(blablacoordsandstuff); // police car 1
  ownedcarteam[tempvarforcar] = 1; // police car
  tempvarforcar =  CreateVehicle(blablacoordsandstuff); // police car 2
  ownedcarteam[tempvarforcar] = 1; // police car
  tempvarforcar =  CreateVehicle(blablacoordsandstuff); // grove car 1
  ownedcarteam[tempvarforcar] = 2; // grove car
  tempvarforcar =  CreateVehicle(blablacoordsandstuff); // police car 2
  ownedcarteam[tempvarforcar] = 2; //grove car
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(ownedcarteam[GetPlayerVehicleID(playerid)] >0) // checking to see if the car is assinged to any team
  {
    if(ownedcarteam[GetPlayerVehicleID(playerid)] != gTeam[playerid]) // wrong car team
    {
      ClearAnimations(playerid);
    }
  }
}
Reply
#10

it wont work dude i got alot of warns/errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)