[help]car only for me
#6

Quote:
Originally Posted by Carlton
pawn Код:
new MyVehicle;

public OnGameModeInit() {
  MyVehicle = AddStaticVehicle(451,1890.1632,1989.1708,13.4920,179.9223,6,6);
  return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate) {
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) {
    if(!strcmp(name, "mikeboy", false) && GetPlayerVehicleID(playerid) == MyVehicle) {
      SendClientMessage(playerid, 0x33AA33AA, "Hi mikeboy");
    }
    else {
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for mikeboy");
    }
  }
  return 1;
}
Thanks It's Helped me!!
Reply


Messages In This Thread
[help]car only for me - by mikeboy - 05.04.2010, 01:17
Re: [help]car only for me - by aircombat - 05.04.2010, 01:29
Re: [help]car only for me - by mikeboy - 06.04.2010, 21:55
Re: [help]car only for me - by Steven82 - 06.04.2010, 22:13
Re: [help]car only for me - by Carlton - 06.04.2010, 22:22
Re: [help]car only for me - by matthewdriftking - 07.06.2010, 07:21

Forum Jump:


Users browsing this thread: 1 Guest(s)