SA-MP Forums Archive
Admin only 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: Admin only cars! (/showthread.php?tid=163372)



Admin only cars! - [MNC]Azz - 27.07.2010

How can i make Rhino, Hunter, Hydra, Seasparrow, Rustler only for admins?
I use Ladmin4v2...
plz help!
thx


Re: HELP NEEDED! Admin only cars! - ikey07 - 27.07.2010

OnPLayerStateChange

if(newstate == ..._DRIVER

if(GetVehicleID(,,,

if(Admin != Your val or smt

RemovePlayerFromVehicle

I write in this way, so you need to learn to do something by self


Re: HELP NEEDED! Admin only cars! - [MNC]Azz - 27.07.2010

Quote:
Originally Posted by ikey07
Посмотреть сообщение
OnPLayerStateChange

if(newstate == ..._DRIVER

if(GetVehicleID(,,,

if(Admin != Your val or smt

RemovePlayerFromVehicle

I write in this way, so you need to learn to do something by self
ill try :/


Re: HELP NEEDED! Admin only cars! - WillyP - 27.07.2010

learn to search maybe


Re: HELP NEEDED! Admin only cars! - [MNC]Azz - 27.07.2010

Quote:
Originally Posted by Lolrofl
Посмотреть сообщение
learn to search maybe
i did but couldnt get a good 1 that works!


Re: HELP NEEDED! Admin only cars! - WillyP - 27.07.2010

lemmy make a little script for you


Re: HELP NEEDED! Admin only cars! - [MNC]Azz - 27.07.2010

Quote:
Originally Posted by Lolrofl
Посмотреть сообщение
lemmy make a little script for you
thx... i keep on failing


Re: HELP NEEDED! Admin only cars! - WillyP - 27.07.2010

lol i have up.

to many errors :L


Re: HELP NEEDED! Admin only cars! - WillyP - 27.07.2010

heres one for names, not done by me:

pawn Код:
// On top of your script:

new Matthias;

// In OnGameModeInit or OnFilterScriptInit

Matthias = AddStaticVehicle(451,1890.1632,1989.1708,13.4920,179.9223,6,6);

// Outside other functions

public OnPlayerStateChange(playerid, newstate, oldstate)
{
  new PlayerName[24];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

  if(newstate == PLAYER_STATE_DRIVER)
  {
   new Vehicle = GetPlayerVehicleID(playerid);
   if(Vehicle == Matthias)
   {
     if(strcmp(PlayerName,"Matthias",true))
     {
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Matthias");
     }
   }
  }
  return 1;
}



Re: HELP NEEDED! Admin only cars! - [MNC]Azz - 27.07.2010

thats a private car script....
it will only do it for 1 car
i got a whole dialog of cars....