Help with flip <playerid>
#1

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:
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;
}
Reply


Messages In This Thread
Help with flip <playerid> - by SomebodyAndMe - 11.12.2011, 08:59
Re: Help with flip <playerid> - by Rob_Maate - 11.12.2011, 09:02
Re: Help with flip <playerid> - by suhrab_mujeeb - 11.12.2011, 09:14
Re: Help with flip <playerid> - by SomebodyAndMe - 11.12.2011, 09:24
Re: Help with flip <playerid> - by Rob_Maate - 11.12.2011, 09:26
Re: Help with flip <playerid> - by suhrab_mujeeb - 11.12.2011, 09:44

Forum Jump:


Users browsing this thread: 1 Guest(s)