SA-MP Forums Archive
how to do this help ? - 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: how to do this help ? (/showthread.php?tid=155405)



how to do this help ? - hardstop - 18.06.2010

Код:
new Owner_1;

OnGameModeInit()
{
  Owner_1 = CreateVehicle(581, 0.0, 0.0, 0.0, 0.0, 6, 6, 3000); 
  return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == 2 || newstate == 3)
  {
    new VehicleID = GetPlayerVehicleID(playerid);
    if(VehicleID == Owner_1)
    {
      new Name[MAX_PLAYER_NAME];
      GetPlayerName(playerid, Name, sizeof(Name));
      if(strcmp( Name, "Firstname_Lastname")) RemovePlayerFromVehicle(playerid);
    }
  }
  return 1;
}
this is an example code but i want to make like a person types /buycar (id) (color id1) (color id2)
then it puts the player into the car and saves car owner how can i do like that?

i have login and register system just need an example code so i can edit it and remake into my gamemode
help please


Re: how to do this help ? - hardstop - 21.06.2010

bump