/car - 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 (
/showthread.php?tid=417638)
/car -
Ananisiki - 22.02.2013
^^^^^^^^
Re: /car -
antonio112 - 22.02.2013
pawn Код:
CMD:car(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1, "Only admins can use this command.");
new vModel, vCol1, vCol2, Float: Pos[4];
if(sscanf(params, "iii", vModel, vCol1, vCol2))
return SendClientMessage(playerid, -1, ""CLBLUE"Folosire{FFFFFF} /spawncar [Vehicle Model] [Culoare] [Culoare]");
if(vModel < 400 || vModel > 600)
return SendClientMessage(playerid, -1, "ERROR: Vehicle model must be between 400 and 600.");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playerid, Pos[3]);
new cCar = CreateVehicle(vModel, Pos[0], Pos[1], Pos[2], Pos[3], vCol1, vCol2, -1);
PutPlayerInVehicle(playerid, cCar, 0);
SendClientMessage(playerid, -1, "Admin vehicle created.");
return 1;
}
Here it is.
Re: /car -
Ananisiki - 22.02.2013
^^^^^^^^
Respuesta: /car -
Strier - 22.02.2013
pawn Код:
CMD:car(playerid, params[])
{
new vModel, vCol1, vCol2, Float: Pos[4];
if(sscanf(params, "iii", vModel, vCol1, vCol2))
return SendClientMessage(playerid, -1, ""CLBLUE"Folosire{FFFFFF} /spawncar [Vehicle Model] [Culoare] [Culoare]");
if(vModel < 400 || vModel > 600)
return SendClientMessage(playerid, -1, "ERROR: Vehicle model must be between 400 and 600.");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playerid, Pos[3]);
new cCar = CreateVehicle(vModel, Pos[0], Pos[1], Pos[2], Pos[3], vCol1, vCol2, -1);
PutPlayerInVehicle(playerid, cCar, 0);
SendClientMessage(playerid, -1, "Vehicle Created-.");
return 1;
}
Command made by Antonio, just edited as how the player wants it.
Re: /car -
Ananisiki - 22.02.2013
^^^^^^^^
Re: /car -
antonio112 - 22.02.2013
It is possible but it's a bit complicated. I found a post though:
http://forum.sa-mp.com/showpost.php?...48&postcount=4
See yourself, if you can do it.
credits to
¤Adas¤, it's his post.