[halp]car reserved
#1

Hi, I would like to know how to make a Car ownership system. Nothing to do with buying, just a car reserved for a player who has donated to the server or something without anyone else being able to get in and drive it. I have already searched and couldn't find anything, pls halp.
Reply
#2

bump
Reply
#3

Try this:

pawn Код:
if(newcar == id) // Replace this with the carID thats reserved.
{
  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(strcmp(PlayerName, "XXXX", true) == 0) // Replace XXXX with your players name.
  {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, 0xFFFF00AA, "* This car is only for donators.");
    return 1;
  }
}

Reply
#4

Код:
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(29) : error 010: invalid function or declaration
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(32) : error 021: symbol already defined: "GetPlayerName"
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(33) : error 010: invalid function or declaration
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(37) : error 010: invalid function or declaration
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(62) : warning 217: loose indentation
C:\Documents and Settings\The User\Desktop\filterscripts\F_Tune_Ex.pwn(73) : warning 203: symbol is never used: "PlayerName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Erors when you load on need to be..
Reply
#6

What do you mean? I can't even compile it with errors, no .amx is formed
Reply
#7

Quote:
Originally Posted by Jumpman23
What do you mean? I can't even compile it with errors, no .amx is formed
post your filterscript
Reply
#8

Код:
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_RED 0xAA3333AA
forward TuneCar();

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~VEHICLES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
new Remington;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~VEHICLES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//


public OnFilterScriptInit()
{
  print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 	print(" .:[ -    Jumpman23 Vehicle FS    - ]:.");
	print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
	
	Remington = CreateVehicle(534,2118.4443,1589.0137,10.5446,179.6832,1,1,50000);//Remington


	TuneCar(); //components
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//


if(Remington) // Replace this with the carID thats reserved.
{
  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(strcmp(PlayerName, "[LF]KAGS", true) == 0) // Replace XXXX with your players name.
  {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, 0xFFFF00AA, "*This car is reserved for [LF]KAGS soz.");
    return 1;
  }
}

public OnVehicleSpawn(vehicleid)
{
	SetTimer("TuneCar",1000,0); //Component Delay Timer
}

///////////////////////////////////////////////////////////////////////////////////////////


public TuneCar()
{
//~~~~~~~~~~~~~~~~~REMINGTON COMPONENTS~~~~~~~~~~~~~~~~~~~~~~~~~//
ChangeVehiclePaintjob(Remington, 3);
AddVehicleComponent(Remington, 1010);
AddVehicleComponent(Remington, 1075);
AddVehicleComponent(Remington, 1101);
AddVehicleComponent(Remington, 1122);
AddVehicleComponent(Remington, 1179);
AddVehicleComponent(Remington, 1180);
AddVehicleComponent(Remington, 1125);
	return 1;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

public OnFilterScriptExit()
{
DestroyVehicle (Remington);
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Isn't really finished (ie havnt put in colours, and it's my first fs.
Reply
#9

Fixed http://pastebin.com/f7cbcad6b
Reply
#10

ty, but when a player gets into the vehicle they aren't ejected, even though RemovePlayerFromVehicle(playerid); is on there. How come?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)