/pony - 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: /pony (
/showthread.php?tid=258764)
/pony - ColdIce - 01.06.2011
Can someone be a doll and create a cmd for me that spawns a Pony (id 413), a red one, and the player spawns into the car(not spawn next to the player).
Something like
if(strcmp(cmdtext, "/pony", true) == 0)
Re: /pony -
Ash. - 01.06.2011
pawn Код:
if(!strcmp("/pony", cmdtext))
{
new Float:x, Float:y, Float:z, Float:ang, veh;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, and);
veh = CreateVehicle(413, x, y, z, ang, -1, -1, -1);
PutPlayerInVehicle(playerid, veh, 0); //as driver
return 1;
}
Re: /pony - ColdIce - 01.06.2011
pawn Код:
GetPlayerFacingAngle(playerid, and);
pawn Код:
error 017: undefined symbol "and"
Re: /pony -
Ash. - 01.06.2011
Sorry it was supposed to be ang not and, i'm typing on my phone - sorry!
Re: /pony -
Seven_of_Nine - 01.06.2011
Replace with
pawn Код:
GetPlayerFacingAngle(playerid,ang);
Re: /pony - ColdIce - 01.06.2011
Ahh thank you very much!
Re: /pony -
Ash. - 01.06.2011
Anytime
Re: /pony - ColdIce - 01.06.2011
I dont expect it's possible that they will always spawn as red?
Re: /pony -
Ash. - 01.06.2011
Erm; I can't remember the actual colour code for red, but search vehicle colour codes on the samp wiki. When you have found wthe colour you are after, replace the createvehicle line with
pawn Код:
CreateVehicle(413, x, y, z, ang, COLOURID, COLOURID, -1);
Re: /pony - ColdIce - 01.06.2011
CreateVehicle(413, x, y, z, ang, COLOR_RED, 0xE60000FF, -1);
like this?