lil help - 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: lil help (
/showthread.php?tid=240888)
lil help -
tanush - 16.03.2011
pawn Код:
if(listitem == 6)
{
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
SendClientMessage(playerid,0xFF9900AA,"You had spawned an Bullet!");
PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
}
when i spawn vehicle, it spawns beside me. how i make if i spawn it, i will be inside vehicle??
Re: lil help -
Alby Fire - 16.03.2011
pawn Код:
if(listitem == 6)
{
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
new ID = CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
SendClientMessage(playerid,0xFF9900AA,"You have spawned an Bullet!");
PutPlayerInVehicle(playerid,ID,0);
}
Should work.
Re: lil help -
tanush - 16.03.2011
little question, how can i make the old vehiclle disappear
Re: lil help -
tanush - 16.03.2011
help pls
Re: lil help -
Alby Fire - 17.03.2011
Quote:
Originally Posted by tanush
little question, how can i make the old vehiclle disappear
|
pawn Код:
if(listitem == 6)
{
new Float:Pos[3], cID;
cID = GetPlayerVehicleID(playerid);
DestroyVehicle(cID);
GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
new ID = CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
SendClientMessage(playerid,0xFF9900AA,"You have spawned an Bullet!");
PutPlayerInVehicle(playerid,ID,0);
}
Re: lil help -
tanush - 17.03.2011
it wont destroy