making an cmd - 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: making an cmd (
/showthread.php?tid=127033)
making an cmd -
Dj_maryo1993 - 11.02.2010
Need the /flip cmd , what function do i use for this ?
/flip = it turnes you back on weel if you are upside-down
Re: making an cmd -
Correlli - 11.02.2010
SetVehicleZAngle should do the trick -
https://sampwiki.blast.hk/wiki/SetVehicleZAngle
Re: making an cmd -
Dj_maryo1993 - 11.02.2010
Thnx .
Re: making an cmd -
biltong - 11.02.2010
I think doing
pawn Код:
public OnPlayerCommandText(playerid,cmdtext)
{
if(strcmp(/flip,cmdtext,true) == 0)
{
new Float:X, Float:Y, Float:Z;
new vehicleid = GetPlaverVehicleID(playerid);
GetVehiclePos(vehicleid,X,Y,Z);
SetVehiclePos(vehicleid,X,Y,Z);
SendClientMessage(playerid, /*insert colour here*/, "You have flipped your vehicle");
return 1;
}
return 1;
}
would do the trick. NOTE: UNTESTED!!!
Re: making an cmd -
Correlli - 11.02.2010
Your code will give errors and it won't work.
There's already a /flip code here -
https://sampwiki.blast.hk/wiki/SetVehicleZAngle
Re: making an cmd -
biltong - 11.02.2010
Is it the strcomp bit? I can't remember how to use it, so used to zcmd >.>