Need Help With Reserved Cars - 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: Need Help With Reserved Cars (
/showthread.php?tid=153105)
Need Help With Reserved Cars -
matthewdriftking - 07.06.2010
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
Re: Need Help With Reserved Cars -
Backwardsman97 - 07.06.2010
Try this.
http://pastebin.com/P0NVwuqt
Re: Need Help With Reserved Cars -
matthewdriftking - 07.06.2010
Quote:
Originally Posted by Baked-Banana
|
Aweseome, Thanks
Re: Need Help With Reserved Cars -
Joe_ - 07.06.2010
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.