SA-MP Forums Archive
Repair and all this - 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)
+--- Thread: Repair and all this (/showthread.php?tid=317457)



Repair and all this - DexToxz - 11.02.2012

Hey!
can you made for me something for the server When i press on "2" Its Fix + Flip + Add Nos to the car?
Thanks


Re: Repair and all this - [XST]O_x - 11.02.2012

pawn Код:
new Float:a;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            RepairVehicle(GetPlayerVehicleID(playerid)); //fix
            GetVehicleZAngle(GetPlayerVehicleID(playerid),a);//flip
            SetVehicleZAngle(GetPlayerVehicleID(playerid),a);
            AddVehicleComponent(GetPlayerVehicleID(playerid) 1010);//nos
        }
    }
    return 1;
}