SA-MP Forums Archive
RPG Mode Adding Private Cars - 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: RPG Mode Adding Private Cars (/showthread.php?tid=86237)



RPG Mode Adding Private Cars - HeX123 - 12.07.2009

I have a rpg mode,i want adding private Corleone family cars...But i cant do it,please help me...I know adding but my mode is have a car key and car engine system.(Bkz. /startup /turnoff)

MSN : d0min4t0r@w.cn



Re: RPG Mode Adding Private Cars - MenaceX^ - 12.07.2009

CreateVehicle/AddStaticVehicle.


Re: RPG Mode Adding Private Cars - HeX123 - 12.07.2009

I know this functions but i don't want it.I want,If player in the Corleone faction can enter this cars.If Player faction != corleone he can't enter this vehicle.I want this...


Re: RPG Mode Adding Private Cars - HeX123 - 12.07.2009

Please help me


Re: RPG Mode Adding Private Cars - Joruz_Tellino - 12.07.2009

Quote:
Originally Posted by HeX123
I know this functions but i don't want it.I want,If player in the Corleone faction can enter this cars.If Player faction != corleone he can't enter this vehicle.I want this...
AddStaticVehicleEx()


Re: RPG Mode Adding Private Cars - MenaceX^ - 12.07.2009

Quote:
Originally Posted by Joruz_Tellino
Quote:
Originally Posted by HeX123
I know this functions but i don't want it.I want,If player in the Corleone faction can enter this cars.If Player faction != corleone he can't enter this vehicle.I want this...
AddStaticVehicleEx()
Huh? Oh cmon, keep your replies awar..
How does it go there? Show me where it checks if a vehicle belongs to the "Corleones".


Re: RPG Mode Adding Private Cars - HeX123 - 13.07.2009

And i know this : "IsACorleoneCar" ,"IsA" bkz...I Know this but i don't know using this functions.

Example :
pawn Код:
public OnPlayerEnterVehicle(????)
{
if(IsACorleoneCar && PlayerInfo[playerid][pMember] == 6(corleone faction number))
{}
else
{
RemovePlayerFromVehicle(playerid)
SendClientMessage(????,????,"You Are Not In Corleone Family !");
return 1;
}
This script do work ?


Re: RPG Mode Adding Private Cars - Gergo1352 - 13.07.2009

pawn Код:
forward IsACorleoneCar(carid);
pawn Код:
public IsACorleoneCar(carid)
{
    if(carid == 123 || carid == 456)
    {
        return 1;
    }
    return 0;
}
Change 123 and 456 to yours and add more if its needed.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new VehicleID = GetPlayerVehicleID(playerid);

        if(IsACorleoneCar(VehicleID) && PlayerInfo[playerid][pMember] == 6)
        {
        // Do nothing.. :D
        }
        else
        {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, 0xFFFFFFAA, "You Are Not In Corleone Family !");
        }
    }
    return 1;
}
This should work.


Re: RPG Mode Adding Private Cars - HeX123 - 13.07.2009

It doesn't work.Im in corleone but i cant enter car.


Re: RPG Mode Adding Private Cars - Gergo1352 - 13.07.2009

Did you changed the car ID?

Are you sure the ID of the Corleone family is 6?