About name
#1

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?
Reply
#2

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
Reply
#3

Thank you very much!
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)