29.11.2009, 17:42
hhm i make like this
but dont work
Код:
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.");} }