FLIP Command
#1

How To Make Flip Command Using ZCMD?
Reply
#2

Explane lil bit more
Reply
#3

Quote:
Originally Posted by detter
Посмотреть сообщение
Explane lil bit more
He wants a flip command?what can he explain more..

OT - Here you go
pawn Код:
CMD:flip(playerid, params[])
    {   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"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;
    }
gimme a rep?
Reply
#4

pawn Код:
COMMAND:flip(playerid, params[]) {

    if(IsPlayerInAnyVehicle(playerid))
    {
        new
            currentveh,
            Float:angle;
        currentveh = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(currentveh, angle);
        SetVehicleZAngle(currentveh, angle);
        SendClientMessage(playerid, -1, "Your vehicle has been flipped.");
        RepairVehicle(currentveh);
        return true;
        }
    else
        {
            SendClientMessage(playerid, -1, "You Must Be Driving A Vehicle To Use This Command.");
            return true;}
}
Reply
#5

pawn Код:
CMD:flip(playerid, params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid, -1, "You can use this command only in a vehicle.");
       
    new Float: angle;
    new vID = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(vID, angle);
    SetVehicleZAngle(vID, angle);
    SendClientMessage(playerid, -1, "You flipped your car.");
    return 1;
}
note that this is just a simple flip command, which works only if your vehicle is upside down.
Reply
#6

Ok Tnx Guys Rep You All
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)