Can make park cmd for privatecars? - 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: Can make park cmd for privatecars? (
/showthread.php?tid=244515)
Can make park cmd for privatecars? -
GBLTeam - 27.03.2011
Here is FS i want to make a park command like the carownerships when you type /v park your car will stay there
really need this if there anyone to help me to make this command if is possible.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new Daniel;
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
  print("\n--------------------------------------");
  print(" Blank Filterscript by your name here");
  print("--------------------------------------\n");
  return 1;
}
#else
main()
{
  print("\n----------------------------------");
  print(" Blank Gamemode by your name here");
  print("----------------------------------\n");
}
#endif
public OnFilterScriptInit()
{
Daniel = AddStaticVehicle(451,1890.1632,1989.1708,13.4920,179.9223,6,6);
}
public OnPlayerDisconnect(playerid, reason)
{
  return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  new PlayerName[24];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(newstate == PLAYER_STATE_DRIVER)
  {
   new Vehicle = GetPlayerVehicleID(playerid);
   if(Vehicle == Daniel)
   {
     if(strcmp(PlayerName,"Daniel_Klaic",true)) //Provjerava dali je igrac Daniel_Klaic
     {
      RemovePlayerFromVehicle(playerid); //Izbacuje igraca iz auta,ako nije Daniel_Klaic
      SendClientMessage(playerid, 0x33AA33AA, "Ovo vozilo moze voziti jedino Daniel_Klaic"); //Izbacuje poruku
     }
   }
  }
  return 1;
}
Re: Can make park cmd for privatecars? -
Jochemd - 27.03.2011
Well, you can get a free ID, and then store the position in a file.