making an cmd
#1

Need the /flip cmd , what function do i use for this ?
/flip = it turnes you back on weel if you are upside-down
Reply
#2

SetVehicleZAngle should do the trick - https://sampwiki.blast.hk/wiki/SetVehicleZAngle
Reply
#3

Thnx .
Reply
#4

I think doing
pawn Код:
public OnPlayerCommandText(playerid,cmdtext)
{
    if(strcmp(/flip,cmdtext,true) == 0)
    {
       new Float:X, Float:Y, Float:Z;
       new vehicleid = GetPlaverVehicleID(playerid);
       GetVehiclePos(vehicleid,X,Y,Z);
       SetVehiclePos(vehicleid,X,Y,Z);
       SendClientMessage(playerid, /*insert colour here*/, "You have flipped your vehicle");
       return 1;
    }
    return 1;
}
would do the trick. NOTE: UNTESTED!!!
Reply
#5

Your code will give errors and it won't work.

There's already a /flip code here - https://sampwiki.blast.hk/wiki/SetVehicleZAngle
Reply
#6

Is it the strcomp bit? I can't remember how to use it, so used to zcmd >.>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)