17.09.2013, 19:35
I created a vehicle for my faction National Guard and when I enter the server can not get in the car!
Code:
Code:
PHP код:
new ngCar1;
public OnGameModeInit()
{
ngCar1 = AddStaticVehicle(430,798.3718000,-1984.0696000,0.3073000,-1.9200000,1,-1); //Predator
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new newcar = GetPlayerVehicleID(playerid);
if(newcar == ngCar1)
{
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { }
else
{
SendClientMessage(playerid,COLOR_TRIADS,"You are not a member/leader NG !");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}