Car slots?? - 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)
+--- Thread: Car slots?? (
/showthread.php?tid=389684)
Car slots?? -
xtr3mepWnaGe - 03.11.2012
my server has 5 maximum car slots. How do i add more?
I need 5 more, btw.
Re: Car slots?? -
verlaj - 03.11.2012
IDK what you are trying to say but you add car under -
Код:
public OnGameModeInit()
the code is
Код:
AddStaticVehicle(vehicleid,x position,y position,z position,facing angle,color 1,color 2); // car pos
so whole code will look like this-
Код:
public OnGameModeInit()
{
AddStaticVehicle(564,24533,131314,453535,24242,1,1);
return 1;
}
note: you can get x,y,z,facing angle from debug mode- located at sampstartup folder(where you installed samp)
Re: Car slots?? -
xtr3mepWnaGe - 03.11.2012
Quote:
Originally Posted by verlaj
IDK what you are trying to say but you add car under -
Код:
public OnGameModeInit()
the code is
Код:
AddStaticVehicle(vehicleid,x position,y position,z position,facing angle,color 1,color 2); // car pos
so whole code will look like this-
Код:
public OnGameModeInit()
{
AddStaticVehicle(564,24533,131314,453535,24242,1,1);
return 1;
}
note: you can get x,y,z,facing angle from debug mode- located at sampstartup folder(where you installed samp)
|
sorry. i mean that the total number that a player can own in a rp script..
but thanks for your effort.
Re: Car slots?? -
verlaj - 03.11.2012
that's a bit complicated, sorry i can't help.
Re: Car slots?? -
xtr3mepWnaGe - 03.11.2012
can i give an example? A player can own a maximum of 5 cars.
I need to make it 9. So that the player can now own a total of 9 cars.
it's ok if you can't help.
Re: Car slots?? -
verlaj - 03.11.2012
well IDK if this will work but
use y_ini to check that how many cars that player own.
for example y_ini load and if it dectect 9 that onplayerbuycar(if you got such function)
if(IsplayerOwnCar(playerid => 9)
{
SendClientMessage(p[layerid,you can't buy more than 9);
}
else
{
car buy code