Bug with cars
#1

Hi
I just download a mod but there is much bugs
1.All players can enter SaNews cars Hitman agency.
2.Some of the LSPD vehicles bugged i enter as a chief of the police and it's write:You dont have keys of this vehicle
and some LSPD vehicles can be stolen all players can get in and take it 0-0
3.Some of the LSPD cars can't use /m(megaphone) and news can't use /news in the cars
What to do?
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(PlayerInfo[playerid][pJailed] == 2)
    {
        new string[256];
        SendClientMessage(playerid, COLOR_LIGHTRED, "~ Do not bug abuse or get banned! ~");
        new Float:cx, Float:cy, Float:cz;
        GetPlayerPos(playerid, cx, cy, cz);
        SetPlayerPos(playerid, cx,  cy, cz);
        new giveplayer[MAX_PLAYER_NAME];
        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
        format(string, sizeof(string), "AdmCmd: %s has been trying to prisonbreak from admin jail!", giveplayer);
        ABroadCast(COLOR_YELLOW,string,1);
    }
    if (dying[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_GRAD2, "~ You can`t drive when you are dying! ~");
        TogglePlayerControllable(playerid, 0);
        ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
    }
    if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
    {
    if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {}
            else {
                new Float:slx, Float:sly, Float:slz;
                GetPlayerPos(playerid, slx, sly, slz);
                SetPlayerPos(playerid, slx, sly, slz);
                SendClientMessage(playerid, COLOR_GRAD2, "You are not in the LSPD!");
            }
        }
        if(IsAGarageCar(vehicleid) && !ispassenger)
        {
            if(IsAGarageMan(playerid)) {}
            else {
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
                SendClientMessage(playerid, COLOR_GRAD2, "You are not Garage worker!");
            }
        }
        if (IsALSPCar(vehicleid) && !ispassenger)
        {
            if(IsAPrisonGuard(playerid) || IsACop(playerid)) {}
           else
            {
                RemovePlayerFromVehicle(playerid);
                new Float:slx, Float:sly, Float:slz;
                GetPlayerPos(playerid, slx, sly, slz);
                SetPlayerPos(playerid, slx, sly, slz);
                SendClientMessage(playerid, COLOR_GRAD2, "You are not in the LSPD!");
            }
        }
        if (IsAnAmbulance(vehicleid) && !ispassenger)
        {
      if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
            else
            {
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
            }
        }
        /*if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337 && AdminDuty[playerid] == 1) { }
            else
            {
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx, cy, cz);
            }
        }*/

    }
    return 1;
}
Reply
#2

mod? FS?
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=203708
this one
GF edit
Reply
#4

Ask there.
Reply
#5

please help no one will reply there it's old topic
Reply
#6

1. Go to
Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
add this:
Code:
if(newcar == MYOLDCAR || newcar == MYOLDCAR || newcar == MYOLDCAR)
		{
		    if(PlayerInfo[playerid][pMember] == FACTIONID || PlayerInfo[playerid][pLeader] == FACTIONID){ }
		    else
		    {
		        SendClientMessage(playerid,COLOR_LIGHTRED,"   You don't have keys of this vehicle !");
		        RemovePlayerFromVehicle(playerid);
		    }
		}
How to find oldcar ? Enter in vehicle then type /oldcar

2. Remake
Code:
public IsACopCar
( remake oldcar's from all LSPD vehicles )

3. If you make the point 2 (2. Remake public IsACopCar ( remake oldcar's from all LSPD vehicles ) ) this will be solved.

xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)