Need Help With Reserved Cars
#1

I have made a reserved car for me on my server, And Every car that i enter is reserved for me heres the code

Код:
On The Top Of the script new carowner;
Under GameModeInit
carowner = AddStaticVehicle(522,1724.6097,-3155.2625,125.9227,0.6656,121,30);
Under OnPlayerStateChange
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) {
  if(!strcmp(name, "[sf]Mat101", false) && GetPlayerVehicleID(playerid) == carowner) {
  SendClientMessage(playerid, 0x33AA33AA, "Hi [sf]Mat101");
    }
    else {
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for [sf]Mat101.");
    }
  }
What's Wrong With This
Reply
#2

Try this.

http://pastebin.com/P0NVwuqt
Reply
#3

Quote:
Originally Posted by Baked-Banana
Aweseome, Thanks
Reply
#4

Go to my website (In my signature) and download the [FS]Private Vehicles in the SA:MP Scripts page, that'll help you alot, and is much more simple.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)