/car command to spawn Infernus - 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 command to spawn Infernus (
/showthread.php?tid=413569)
/car command to spawn Infernus -
Vytixz - 05.02.2013
dfadasdasdasdas
Re: /car command to spawn Infernus -
zde5 - 05.02.2013
https://sampforum.blast.hk/showthread.php?tid=413556
Re: /car command to spawn Infernus -
AphexCCFC - 06.02.2013
pawn Код:
CMD:car(playerid, params[])
{
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
PutPlayerInVehicle(playerid, 411, 0);
}
Re: /car command to spawn Infernus -
mrtms - 06.02.2013
To add the optional part:
SendClientMessage(playerid, COLOR_GREEN, "Message here.");
Re: /car command to spawn Infernus -
RajatPawar - 06.02.2013
Quote:
Originally Posted by AphexCCFC
pawn Код:
CMD:car(playerid, params[]) { new Float:pos[4]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); GetPlayerFacingAngle(playerid, pos[3]); CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200); PutPlayerInVehicle(playerid, 411, 0); }
|
I think this is a bit wrong, it could put you in any infernus across the server. Also, params[] is not needed.
Therefore,
pawn Код:
CMD:car(playerid)
{
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
new vehicle = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
PutPlayerInVehicle(playerid, vehicle, 0);
SendClientMessage(playerid, -1, "Your infernus has been spawned.");
}
Re: /car command to spawn Infernus -
AphexCCFC - 06.02.2013
Quote:
Originally Posted by Rajat_Pawar
I think this is a bit wrong, it could put you in any infernus across the server. Also, params[] is not needed.
Therefore,
pawn Код:
CMD:car(playerid) { new Float:pos[4]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); GetPlayerFacingAngle(playerid, pos[3]); new vehicle = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200); PutPlayerInVehicle(playerid, vehicle, 0); SendClientMessage(playerid, -1, "Your infernus has been spawned."); }
|
Oh yeah, thanks for correcting
Re: /car command to spawn Infernus -
[WA]iRonan - 06.02.2013
Seems somebody asked my question. Thaanks :3
Re: /car command to spawn Infernus -
Vytixz - 06.02.2013
dasdsdaddsasd
Re: /car command to spawn Infernus -
AphexCCFC - 07.02.2013
Under:
pawn Код:
SendClientMessage(playerid, -1, "Your infernus has been spawned.");
Put: