18.06.2012, 05:37
Hey,
Can anyone tell me How to Make a /flip command ?
Thanks
Can anyone tell me How to Make a /flip command ?
Thanks
YCMD:flip(playerid, params[], help)
{
new Float: P[ 4 ];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,RED,"This Player Is Not In Vehicle");
GetPlayerPos( playerid, P[ 0 ], P[ 1 ], P[ 2 ] );
GetVehicleZAngle( GetPlayerVehicleID( playerid ) , P[ 3 ]);
SetVehiclePos( GetPlayerVehicleID( playerid ), P[ 0 ], P[ 1 ], P[ 2 ] );
SetVehicleZAngle( GetPlayerVehicleID( playerid ), P[ 3 ] );
SendClientMessage(playerid,GREEN,"Your Vehicle Has Been Fliped!");
SendClientMessage(playerid,GREEN,"To Flip Player's Vehicle Use /Flipp");
return 1;
}
if (strcmp("/flip", cmdtext, true, 10) == 0)
{
new Float: P[ 4 ];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,RED,"This Player Is Not In Vehicle");
GetPlayerPos( playerid, P[ 0 ], P[ 1 ], P[ 2 ] );
GetVehicleZAngle( GetPlayerVehicleID( playerid ) , P[ 3 ]);
SetVehiclePos( GetPlayerVehicleID( playerid ), P[ 0 ], P[ 1 ], P[ 2 ] );
SetVehicleZAngle( GetPlayerVehicleID( playerid ), P[ 3 ] );
SendClientMessage(playerid,GREEN,"Your Vehicle Has Been Fliped!");
return 1;
}