SA-MP Forums Archive
Removing the drivers license script thingy - 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: Removing the drivers license script thingy (/showthread.php?tid=108999)



Removing the drivers license script thingy - JoeDaDude - 17.11.2009

Hi, I looked at the drivers license bit from my mates rp script,
And it has RemovePlayerFromVehicle on the car bit
It also has a message, You dont know how to drive yet,
So i changed that message to: You do not have a drivers license, So drive carefully otherwise the cops will notice.
And removed the RemovePlayerFromVehicle

But he still gets removed ingame?


Re: Removing the drivers license script thingy - Zeromanster - 17.11.2009

Find every accourance of RemovePlayerFromVehicle, and if it has a connection with pCarLic (im assuming you use Godfather, or an edit) change that and it should be fine.



Re: Removing the drivers license script thingy - JoeDaDude - 17.11.2009

Im not understanding


Re: Removing the drivers license script thingy - UberSocks - 17.11.2009

He's saying that you should remove 'RemovePlayerFromVehicle' in every part of your script, like it might occur more than once.

The simplest way to do so is when you are in the pawno editor, hold down CTRL + F and type in 'RemovePlayerFromVehicle' without ' marks. Delete or comment these lines where 'RemovePlayerFromVehicle' occurs.


Re: Removing the drivers license script thingy - JoeDaDude - 17.11.2009

That would let people drive cop cars and everything though


Re: Removing the drivers license script thingy - miokie - 17.11.2009

Quote:
Originally Posted by JoeDaDude
That would let people drive cop cars and everything though
Just delete the ones that are associated with what you use to track if a player has a license.


Re: Removing the drivers license script thingy - JoeDaDude - 17.11.2009

I hate godfather, And LARP, But i love moderntopia,
So i tried it on there:

Before:
pawn Код:
else
        {
            if(PlayerInfo[playerid][pCarLic] < 1)
            {
              if(PlayerDrunk[playerid] >= 5)
                {
                  WantedPoints[playerid] += 1;
                    SetPlayerCriminal(playerid,255, "Drunk Driving");
                }
                if(TakingLesson[playerid] != 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "You don't know how to Drive yet, So drive carefully otherwise the cops will notice");
                    if (PlayerInfo[playerid][pLinked] == 0) SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You will not be able to do any license tests before you link your character to a website account. Use /li for more information.");
RemovePlayerFromVehicle();
                    return 1;
                }
            }
        }
After:
pawn Код:
else
        {
            if(PlayerInfo[playerid][pCarLic] < 1)
            {
              if(PlayerDrunk[playerid] >= 5)
                {
                  WantedPoints[playerid] += 1;
                    SetPlayerCriminal(playerid,255, "Drunk Driving");
                }
                if(TakingLesson[playerid] != 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "You don't know how to Drive yet, So drive carefully otherwise the cops will notice");
                    if (PlayerInfo[playerid][pLinked] == 0) SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You will not be able to do any license tests before you link your character to a website account. Use /li for more information.");
                    return 1;
                }
            }
        }
I only had to do it once and then it worked