SA-MP Forums Archive
SCRIPT CAR THAT ONLY ONE NAME CAN DRIVE? HOW HELP ME? - 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: SCRIPT CAR THAT ONLY ONE NAME CAN DRIVE? HOW HELP ME? (/showthread.php?tid=111302)



SCRIPT CAR THAT ONLY ONE NAME CAN DRIVE? HOW HELP ME? - buonggiorno - 01.12.2009

Hi i am admin lvl 1338 on my server, i want to add some cars that only admin 1338 or my nick can drive.

what i need to do? can someone give me code?


Re: SCRIPT CAR THAT ONLY ONE NAME CAN DRIVE? HOW HELP ME? - diesulke - 01.12.2009

What's the name of your admin script you're using?


Re: SCRIPT CAR THAT ONLY ONE NAME CAN DRIVE? HOW HELP ME? - makogemata - 02.12.2009

If u want elegy etc then add these things to your script..

Code:
new adminSultan;
Then add vehicle to somewhere
Like :
Code:
adminSultan = AddStaticVehicle(560,2120.8914,2367.4456,10.5250,179.6506,0,0); // Admin Sultan
And add this :
Code:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == adminSultan && PlayerAdminLevel[playerid] != 1338 || oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == adminElegy && PlayerAdminLevel[playerid] != 1338) {
	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_ERROR,"This vehicle is reserved for Server Admins - You cannot use this vehicle!");
	return 1;
Thats it i think ..

//