Owner's CAR
#1

I Saw On A Stunt Server .. On The Random Spawn .. I Have Spawned On A Stunt Area .. And I SAW .. A Big Car With Nitrous And Modded And It's Awesome Then I Try To Drive It ... It Says To Me You Can't Drive This Car .. Only The owner .. Anyone Here Know how to do this script ?? ...
Reply
#2

When a player changes his state, check if a player is the owner of the vehicle.
In order to make this work, you will have to create a player stats system, in order to set the player's owned vehicle.
Reply
#3

Example script of what _Tommy say

frist make a new

like
pawn Код:
new mycar;
then create the car with mycar name

like
pawn Код:
mycar = AddStaticVehicle(blablablabla
then in when player change the state

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new V = GetPlayerVehicleID(playerid);
        if(V == mycar)
        {
            if(IsPlayerAdmin(playerid))
            {
                return 1;
            }
            else
            {
                SendClientMessage(playerid,0xFF0000AA, "Admin vehicle");
                                 //removeplayervehiclething


            }
        }
    }
    return 1;
}
if u are admin u can enter in the car ... idk if work xD i dont remember
Reply
#4

Ok Thx For Comments

((Now I Can Make many MODDED Cars With Players Who I Want And Me Too on My Admin House))

THX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)