SA-MP Forums Archive
No license problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: No license problem (/showthread.php?tid=77760)



No license problem - JoeDaDude - 14.05.2009

This is a rp script my mate made and he sent it me,
This is no way related to godfather or moderntopia so you cannot link me to the topic.

My mate has made it so it kicks you out of the car if you dont have a license,
And i found the code i changed the sendclientmessage so it says drive carefully,
And i found RemovePlayerFromVehicle, So i removed that leaving me with,
pawn Код:
if(TakingLesson[playerid] == 1) { }
                else {
                SendClientMessage(playerid, COLOR_GREY, "  You don't know how to Drive yet, so drive carefully otherwise the cops will notice!");
                }
But it still kicks me out the car, Anyone have any advice of why it still kicks me out?


Re: No license problem - Weirdosport - 14.05.2009

If you're sure you compiled it and used the new compiled version, use CTRL + F to find any more instances of RemovePlayerFromVehicle


Re: No license problem - MX_Master - 14.05.2009

we need more code to understand your problem


Re: No license problem - JoeDaDude - 14.05.2009

Flying license and boating license have RemovePlayerFromVehicle,
So i cant remove them, Cop cars also have RemovePlayerFromVehicle

pawn Код:
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
    {// 38 / 49 / 56 = SS
        new newcar = GetPlayerVehicleID(playerid);
        new oldcar = gLastCar[playerid];
        new housecar = PlayerInfo[playerid][pPhousekey]+1;
        TelePos[playerid][0] = 0.0;
        TelePos[playerid][1] = 0.0;
        if(IsABoat(newcar))
        {
          if(PlayerInfo[playerid][pBoatLic] < 1)
            {
              SendClientMessage(playerid, COLOR_GREY, "  You don't know how to Sail yet, so you left the Boat !");
              RemovePlayerFromVehicle(playerid);
            }
        }
        else if(IsAPlane(newcar))
        {
          if(PlayerInfo[playerid][pFlyLic] < 1)
            {
              if(TakingLesson[playerid] == 1) { }
              else {
              SendClientMessage(playerid, COLOR_GREY, "  You don't know how to Fly yet, so you left the Plane !");
              RemovePlayerFromVehicle(playerid); }
            }
        }
        else
        {
            if(PlayerInfo[playerid][pCarLic] < 1)
            {
              if(PlayerDrunk[playerid] >= 5)
                {
                  WantedPoints[playerid] += 1;
                    SetPlayerCriminal(playerid,255, "Drunk Driving");
                }
                if(TakingLesson[playerid] == 1) { }
                else {
                SendClientMessage(playerid, COLOR_GREY, "  You don't know how to Drive yet, so drive carefully otherwise the cops will notice!");
                }
            }
            else if(PlayerDrunk[playerid] >= 5)
            {
              WantedPoints[playerid] += 1;
                SetPlayerCriminal(playerid,255, "Drunk Driving");
            }
        }



Re: No license problem - killerx100 - 14.05.2009

Is this GF script? Anyway I prefer you check IsABoat car's ids and make IsACar.


Re: No license problem - Cabby - 15.05.2009

Try remove "RemovePlayerFromVehicle" From the other licenses.


Re: No license problem - JoeDaDude - 15.05.2009

Quote:
Originally Posted by Cabby
Try remove "RemovePlayerFromVehicle" From the other licenses.
As i said if it did work it would make it all driveable/flyable
I only want the cars driveable, Can anyone help me, ty


Re: No license problem - soryy708 - 15.05.2009

Are you sure you 'Complile & Run' it? To check, move the .PWN file to a diffrent folder and hit the button u usualy hit. Is there a new .AMX made in the folder after this?
If not, then you dont compile it right.
Else, it will be abit complicated.