Need a vehicle lock system that..
#3

Try this

pawn Код:
new Frozen[MAX_PLAYERS];
forward Freeze();

public OnPlayerConnect(playerid)
{
    Frozen[playerid] = 0;
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger) return 0;

    if(vehicleid == WHATEVER)
    {
        new PlayerName[MAX_PLAYER_NAME] = GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
        if(!strcmp(PlayerName, "YouName", true))
        {
            SetTimer("Freeze",5,false); TogglePlayerControllable(playerid, 0);
            Frozen[playerid] = 1;
        } else return 0;
    }
    return 1;
}

public Freeze()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(Frozen[i] == 1)
      {
        TogglePlayerControllable(i, 1);
        SendClientMessage(i, 0xFFFFFFAA,"  You are not the owner of this vehicle!");
      }
    }
    return 1;
}
Reply


Messages In This Thread
Need a vehicle lock system that.. - by FujiNNN - 24.03.2010, 21:07
Re: Need a vehicle lock system that.. - by Zimon95 - 24.03.2010, 21:36
Re: Need a vehicle lock system that.. - by Fabio11 - 24.03.2010, 22:09
Re: Need a vehicle lock system that.. - by FujiNNN - 24.03.2010, 22:32

Forum Jump:


Users browsing this thread: 1 Guest(s)