gTeam teams car
#1

How can i make a car for team? using a gTeam

Код:
if (gTeam[playerid] == 2)
It looks like, player gets in car, gots a message like: This car is only for police! and gets removed from car? Please help me
Reply
#2

Код:
new policecar;
Код:
policecar = AddStaticVehicleEx(596,1574.4741,-1711.3000,5.6120,0.00,-1,-1,-1);
Код:
if(newcar == policecar)
		{
		  if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6) { }
		  else
			{
		    SendClientMessage(playerid,COLOR_GREY,"  You are not a Police!");
		    RemovePlayerFromVehicle(playerid);
		  }
		}
Reply
#3

ETCH, thank u
Reply
#4

use that :

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);

if(gTeam[playerid] != 2)
{
if(modelid == 470)
{
SendClientMessage(playerid, RED, "only for police");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Reply
#5

Quote:
Originally Posted by [AC
Etch ]
use that :

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);

if(gTeam[playerid] != 2)
{
if(modelid == 470)
{
SendClientMessage(playerid, RED, "only for police");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  new vehicleid = GetPlayerVehicleID(playerid);
  new modelid = GetVehicleModel(vehicleid);

  if(gTeam[playerid] != 2) {
    if(modelid == 470) {
      SendClientMessage(playerid, RED, "only for police");
      RemovePlayerFromVehicle(playerid);
    }
  }
  return 1;
}
indent it....
Reply
#6

well that is a way now which ignore the "loose indentation" warning which all scripters are using now and its to put :

#pragma tabsize 0

under ur includes so no more worry about that warning
Reply
#7

Quote:
Originally Posted by [AC
Etch ]
well that is a way now which ignore the "loose indentation" warning which all scripters are using now and its to put :

#pragma tabsize 0

under ur includes so no more worry about that warning
Yes, but who wants a messy script? I know i don't. Using #pragma tabsize 0 isn't recommended.
Reply
#8

i know it isnt but its alot better and comfortable than keep calculating spaces and tabs?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)