[Tutorial] Simple Flip Command
#1

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
Reply
#2

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

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

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...
Reply
#5

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
Reply
#6

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

i think this not TUTORIAL, is FILTERSCRIPT
Reply
#8

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
Reply
#9

Not a tutorial. This should be descriptive.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)