Vehicle Valet - 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: Vehicle Valet (
/showthread.php?tid=65107)
Vehicle Valet -
StrickenKid - 09.02.2009
Im in a little stump, im making a valet script but when i un-valet the car everyone's in the servers samp scrashes.
all i am doing is having the cmd /valet which will destroy the vehicle but save all its parameters (so no one can blowup/steal there cars)
then they can type /unvalet, which will do AddStaticVehicle with all its parameters and they get there car back!
So how would i do this without crashing everyone's samp?
I am also using strcmp.
Re: Vehicle Valet -
ICECOLDKILLAK8 - 09.02.2009
1) You already posted this
2) We eed to see some code first, Maybe your /valet and /unvalet command?
Re: Vehicle Valet -
Eraz0r - 09.02.2009
As far as i know u can't use AddStaticVehicle while the Server is running. Test CreateVehicle.
Re: Vehicle Valet -
StrickenKid - 09.02.2009
JeNkStAX,
1. No Body Replied
2. The Code im using doest work (REASON I POSTED THIS)
Re: Vehicle Valet -
Eraz0r - 09.02.2009
Quote:
Originally Posted by Ethan1233
JeNkStAX,
1. No Body Replied
2. The Code im using doest work (REASON I POSTED THIS)
|
Look at my post. You have to use CreateVehicle(...) for creating vehicles outside of OnGameModeInit.
Re: Vehicle Valet -
StrickenKid - 09.02.2009
i tried that to no luck :/ samp just crashes, would anybody be nice enough to wright up a working script for me?
Re: Vehicle Valet -
Eraz0r - 09.02.2009
Quote:
Originally Posted by Ethan1233
i tried that to no luck :/ samp just crashes, would anybody be nice enough to wright up a working script for me?
|
Well it would be nice if u post your commands which are not working, because I can't do much with the word "valet".
Re: Vehicle Valet -
yom - 09.02.2009
You obviously have to post your broken script, so people can help you fixing it..
Re: Vehicle Valet -
ICECOLDKILLAK8 - 09.02.2009
Quote:
Originally Posted by Ethan1233
JeNkStAX,
1. No Body Replied
2. The Code im using doest work (REASON I POSTED THIS)
|
1) Take a chill pill
2) WE DO ACTUALLY NEED YOUR CODE
Re: Vehicle Valet -
StrickenKid - 09.02.2009
lol i posted it on the other post but ok..
here it is..
on the top:
Code:
Код:
new carvalet; // valet cars to player club!
on the /cmds:
Code:
Код:
if(strcmp(cmdtext,"/valet",true)==0)
{
carvalet = GetPlayerVehicleID(playerid);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(carvalet);
carisvaled = 1;
return 1;
}
if(strcmp(cmdtext,"/unvalet",true)==0)
{
new carid;
carid = CreateVehicle(carvalet, 2001.6718,1769.9086,10.6719,95.6376, 0, 1,50000);
PutPlayerInVehicle(playerid,carid,0);
carisvaled = 0;
return 1;
}