11.12.2011, 08:59
Hi there, I'm using sscanf2 and trying to make the command /flip <playerid> for admins and if your not an admin: /flip
How can I make it that it for admins /flip <playerid> and that they can flip themself ofcourse. and for normal players only: /flip?
Someone please help.
Current command:
How can I make it that it for admins /flip <playerid> and that they can flip themself ofcourse. and for normal players only: /flip?
Someone please help.
Current command:
pawn Код:
COMMAND:flip(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/flip", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Setup some local variables
new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
// Check if the player is inside a vehicle
if(IsPlayerInAnyVehicle(playerid))
SetCameraBehindPlayer(playerid);
// Get the player's position
GetPlayerPos(playerid, x, y, z);
// Set the vehicle on the player's coordinates
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
// Let the vehicle point north
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}