SA-MP Forums Archive
[Tutorial] Simple Flip Command - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Simple Flip Command (/showthread.php?tid=450494)



Simple Flip Command - Nanjaya - 13.07.2013

Hello Guys , I want to show you how to make Simple Flip Command
Code:
if (strcmp("/flip", cmdtext, true, 10) == 0)
	{
	if(IsPlayerInAnyVehicle(playerid))
	{
	    new currentveh;
	    new Float:angle;
	    currentveh = GetPlayerVehicleID(playerid);
	    GetVehicleZAngle(currentveh, angle);
	    SetVehicleZAngle(currentveh, angle);
	    SendClientMessage(playerid, 0x99FFFFAA, "Your vehicle has been flipped.");
	    return 1;
	}
	else
	{
	 SendClientMessage(playerid, 0xAA3333AA, "You are not in any vehicle!");
	 return 1;
	}
	}
	return 0;
}
Thats it Thanks


Re: Simple Flip Command - dannyk0ed - 13.07.2013

https://sampwiki.blast.hk/wiki/SetVehicleZAngle with same changes.


Re: Simple Flip Command - Sellize - 13.07.2013

I don't even dare calling this a tutorial >.>


Respuesta: Simple Flip Command - PHudson - 13.07.2013

You could have explained what you did. This is a "useful" code, not a tutorial.
Actually it isn't that useful. The angle you set is the same the vehicle already had. To "flip" a vehicle the angle must increase 180 degrees. It should be like this:

pawn Code:
SetVehicleZAngle(currentveh, angle+180);
You should also improve your indentation...


Re: Simple Flip Command - JaKe Elite - 14.07.2013

Another tutorial who just did

"Hello i am n00b (not insulting just part of joke) and i'm going to teach you how to create a server.

first download the pack in sa-mp forums
second install it inside your computer
third done

How to script?

Easy just do

#include <a_samp> and done"

Blahblahblah i'm sick of this. Tutorial without explanation


Re: Simple Flip Command - Red_Dragon. - 14.07.2013

Where's the tutorial in here? You just came in, posted a piece of code and called it a tutorial? Seems legit!


Re: Simple Flip Command - mahardika - 15.07.2013

i think this not TUTORIAL, is FILTERSCRIPT


Re: Simple Flip Command - SwisherSweet - 15.07.2013

Quote:
Originally Posted by _Jake_
View Post
Another tutorial who just did

"Hello i am n00b (not insulting just part of joke) and i'm going to teach you how to create a server.

first download the pack in sa-mp forums
second install it inside your computer
third done

How to script?

Easy just do

#include <a_samp> and done"

Blahblahblah i'm sick of this. Tutorial without explanation
For some reason being drunk and reading this makes it so much more funnier nice joke

Also i dont mean to insult or anything but i saw the same exact code somewhere except in zcmd...idk


Re: Simple Flip Command - Champ - 15.07.2013

Not a tutorial. This should be descriptive.