Little 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)
+--- Thread: Little Help (
/showthread.php?tid=361754)
Little Help -
Avi57 - 22.07.2012
Hey,
i have created a cmd /vcar so i need that when a Player type /vcar, It Spawn them a Infernus !
Can anyone create it ?
Thanks
Re: Little Help -
MoNeY_Co0oLzZz - 22.07.2012
wELL , friend of Avi
If u help +rep
Thankx
Re: Little Help -
Cjgogo - 22.07.2012
pawn Код:
COMMAND:vcar(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new infernus;
infernus=CreateVehicle(411,x,y+2,z,0,0,0,0);
PutPlayerInVehicle(playerid,infernus,0);
return 1;
}
Re: Little Help -
maramizo - 22.07.2012
pawn Код:
CMD:veh(playerid, params[]) {
new
iVehicle,
iColors[2];
if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1])) {
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /veh [model ID] [color 1] [color 2]");
}
else if(!(400 <= iVehicle <= 611)) {
SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid model specified (model IDs start at 400, and end at 611).");
}
else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255)) {
SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid colour specified (IDs start at 0, and end at 255).");
}
new
Float: fVehPos[4];
GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
GetPlayerFacingAngle(playerid, fVehPos[3]);
CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2], fVehPos[3], iColors[0], iColors[1], -1);
return SendClientMessageEx(playerid, COLOR_GREY, "Vehicle spawned!");
}
}
In which player types in /veh [carid] [color1] [color2]
Then it spawns the vehicle.
Re: Little Help -
Avi57 - 22.07.2012
Quote:
Originally Posted by MoNeY_Co0oLzZz
wELL , friend of Avi
If u help +rep
Thankx
|
Need 50+ Post to give Rep !
Re: Little Help -
Avi57 - 22.07.2012
Thx Cjgogo !
REPPED !
Re: Little Help -
MoNeY_Co0oLzZz - 22.07.2012
Thank YOU Cjgogo!
You HeLp us a LoTs..!!!
Re: Little Help -
MoNeY_Co0oLzZz - 22.07.2012
Sorry for double post but!!
I like maramizo code! Best
Thanx For heLp again