SA-MP Forums Archive
About name - 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: About name (/showthread.php?tid=125506)



About name - Mr L - 04.02.2010

Hello guys

i need something like this , my name on my server is Snoop_Dogg i want when im going to enter the car (house car my) i want only me drive it no one can someone help me?


Re: About name - Torran - 04.02.2010

pawn Код:
new YourCar;

YourCar = CreateVehicle

public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER)
  {
  if(vehicleid == car4)
  {
  new name[24];
  GetPlayerName(playerid,name,24);
  if(strcmp(name, "YourName", false) == 0)
  {
  }
  else
  {
  RemovePlayerFromVehicle(playerid);
  }
}
}
  return 1;
}
Should work, I just wrote it from scratch so you might wanna test it
EDIT: Missed something out, Il edit again when fixed
EDIT: Fixed, But still test


Re: About name - Mr L - 04.02.2010

Thank you very much!


Re: About name - Torran - 04.02.2010

NOTE: Change car4 to Yourcar or whatever you car is named