Vehicle Valet
#1

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.
Reply
#2

1) You already posted this
2) We eed to see some code first, Maybe your /valet and /unvalet command?
Reply
#3

As far as i know u can't use AddStaticVehicle while the Server is running. Test CreateVehicle.
Reply
#4

JeNkStAX,
1. No Body Replied
2. The Code im using doest work (REASON I POSTED THIS)
Reply
#5

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.
Reply
#6

i tried that to no luck :/ samp just crashes, would anybody be nice enough to wright up a working script for me?
Reply
#7

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".
Reply
#8

You obviously have to post your broken script, so people can help you fixing it..
Reply
#9

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
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)