SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 25/07/2010, 04:38 PM   #11
Jay.
High-roller
 
Join Date: Nov 2009
Location: UK
Posts: 1,121
Reputation: 44
Default Re: [TUT]Making a simple flip command

Quote:
Originally Posted by Samdudes View Post
Why would that work? You getting the zangle and then your setting the vehicle to the same zangle.. Lool
Lol zangle is the name of my varaible i chose you can choose anyone you want.
Jay. is offline   Reply With Quote
Old 25/07/2010, 08:18 PM   #12
CSMajor
Big Clucker
 
CSMajor's Avatar
 
Join Date: Jul 2010
Posts: 102
Reputation: 0
Default Re: [TUT]Making a simple flip command

Quote:
Originally Posted by Flo_White View Post
pawn Code:
if (strcmp("/flip", cmdtext, true, 5) == 0)
{  
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED2,"You must be in a vehicle.");
        new vehicle;
        new Float:zangle;
        vehicle = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(vehicle,zangle);
        SetVehicleZAngle(vehicle,zangle);
        SendClientMessage(playerid,color,"Vehicle succesfully flipped.");
        return 1;
}

this should work
i do not understand the z angle thing. but this works. i thought it would stay flipped but it didnt.
CSMajor is offline   Reply With Quote
Old 25/07/2010, 08:48 PM   #13
Jay.
High-roller
 
Join Date: Nov 2009
Location: UK
Posts: 1,121
Reputation: 44
Default Re: [TUT]Making a simple flip command

Quote:
Originally Posted by CSMajor View Post
i do not understand the z angle thing. but this works. i thought it would stay flipped but it didnt.
The zangle is just a varaible.

You can name your own like new car;

Or whatever you want.
Jay. is offline   Reply With Quote
Old 28/07/2010, 08:38 PM   #14
CSMajor
Big Clucker
 
CSMajor's Avatar
 
Join Date: Jul 2010
Posts: 102
Reputation: 0
Default Re: [TUT]Making a simple flip command

i know, i meant that angle. using a angle thats already there to set the angle.
CSMajor is offline   Reply With Quote
Old 28/07/2010, 09:51 PM   #15
John_F
Huge Clucker
 
John_F's Avatar
 
Join Date: Jul 2010
Posts: 244
Reputation: 0
Default Re: [TUT]Making a simple flip command

For those of you who don't understand:
setting a vehicle's z angle automatically puts it upright, so in essense this script just sets the car back to the position it was when you entered the command, except, it will be upright.
__________________

**New COD server!**
Hosted list!
64.120.47.67:7777
Forum: www.cod-dm.com

Need scripting support or a person to script for you? PM me.
John_F is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.