[FilterScript] [FS]Private Cars
#1

Its just a basic private vehicle script were only players with a certain name can enter the vehicle and drive it.
Its an extremely simple script but i was bored today so I just decided to make it since I've saw people having trouble with a very basic idea for a private car. Its very simple to add new icons and vehicles
Enjoy


Pastebin-http://pastebin.com/3egJdXvp


SS's of it right here-
Reply
#2

Nice Work
Reply
#3

Your telling people to put there private cars in the wrong places,

Example:
Quote:
Originally Posted by Script
//End of [ECA]Sinbad's private vehicle
//Start New private vehicle here
Your putting that after you've closed the callback

Quote:
Originally Posted by Script
public OnPlayerStateChange(playerid,newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
new pname[MAX_PLAYER_NAME];

GetPlayerName(playerid,pname,sizeof pname);

if (newstate == PLAYER_STATE_DRIVER)
{
if (vehicleid == sinbadcar)
{
if(strcmp(pname,"[ECA]Sinbad",true) ==0)
{
{
SendClientMessage(playerid,green,"Welcome back to your private vehicle Admin Sinbad");
}

return 1;
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,red,"This PRIVATE Vehicle belongs to [ECA]Sinbad, you cannot drive this vehicle");
}
}
}
return 1;
}
//End of [ECA]Sinbad's private vehicle
//Start New private vehicle here
Reply
#4

well than you fix it joe and put a mirrow on here and ill add it to the download
Reply
#5

Code:
C:\Users\Tripp\Desktop\SAMP GMs\Pvt. Car.pwn(68) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Edit: No response?
I'm running version 0.3a R7


Quote:
Originally Posted by ServerFFS
Which version do you want to change your server to?
Your server is currently running on 0.3a R7.
Reply
#6

How to edit to one car have multiple users?
For 1 car only that 3-4 person can drive:S
Reply
#7

Nice, simple for new scripters.

I don't want you to think I'm advertising my script, but if you want a more professional (and simple) way, go to my website in my sig and go the the SA-MP Scripts page, I have my Private Vehicle script (Not released due to so many on the forum) which is only one line for one vehicle, and very efficient. (could be better, but It's dynamic for everyone, hense MAX_PLAYERS etc.)
And maybe you could learn off that, such as the way I use arrays.
Reply
#8

nice work there pal...this is usefull for rp servers..^[sarcasm]no advertising at all[/sarcasm]
Reply
#9

GJ but i have a problem.
When i paste this in my GM i have this error after i press the complie button:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)