public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ if(IsPlayerConnected(playerid)){ if(model == 525 && !ispassenger && GANG[playerid] != idiots){ //MODEL OF GANG CAR | NOPASSENGER | GANG TogglePlayerControllable(playerid, 0); //freeze TogglePlayerControllable(playerid, 1); //unfreeze SendClientMessage(playerid,COLOR_GREEN, "proparty of idiots"); return 1; } return 1; }
new model = GetVehicleModel(vehicleid);
Originally Posted by 666godspeed666
why kick? he canT enter
|
new Mafia[MAX_PLAYERS];
OnPlayerEnterVehicle(playerid, vehicleid, is passenger)
{
new VM = GetVehicleModel(vehicleid);
if(VM == 560 && Mafia[playerid] != 1 && !ispassenger)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR, "This vehicle belongs too the Mafia, You can't use it!");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ if(IsPlayerConnected(playerid)){ if (IsAGangCar(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember]==5||PlayerInfo[playerid][pLeader]==5) { } else { } } if (IsAGangCar2(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember]==6||PlayerInfo[playerid][pLeader]==6) { } else { } } if (IsAGangCar3(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember]==14||PlayerInfo[playerid][pLeader]==14) { } else { } } if (IsAGangCar4(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember]==15||PlayerInfo[playerid][pLeader]==15) { } else { } } if (IsAGangCar5(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember]==16||PlayerInfo[playerid][pLeader]==16) { } else { } } } public IsAGangCar(carid) { if(carid >= 160 && carid <= 163) { return 1; } return 0; } public IsAGangCar2(carid) { if(carid >= 164 && carid <= 167) { return 1; } return 0; } public IsAGangCar3(carid) { if(carid >= 189 && carid <= 191) { return 1; } return 0; } public IsAGangCar4(carid) { if(carid >= 168 && carid <= 171) { return 1; } return 0; } public IsAGangCar5(carid) { if(carid >= 168 && carid <= 171) { return 1; } return 0; } if(IsAGangCar(newcar)) { if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 5) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,"You dont have keys.");} } if(IsAGangCar2(newcar)) { if(PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == 6) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,"You dont have keys.");} } if(IsAGangCar3(newcar)) { if(PlayerInfo[playerid][pLeader] == 14||PlayerInfo[playerid][pMember] == 14) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,"You dont have keys.");} } if(IsAGangCar4(newcar)) { if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == 15) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,"You dont have keys.");} } if(IsAGangCar5(newcar)) { if(PlayerInfo[playerid][pLeader] == 16||PlayerInfo[playerid][pMember] == 16) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,"You dont have keys.");} }