facing angle
#5

ok..... will it tele the player right behind of him? cus

pawn Code:
CMD:cuff(playerid, params[])
{
    new id, Float:x, Float:y, Float:z,Float:angle, idname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME],tmp[128];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF00AAFF, "*USAGE: /cuff [playerid / part of name]");
    else if(gTeam[playerid] != TEAM_COPS) return SendClientMessage(playerid, 0xFF00AAFF, "*ERROR: You are not a Police Officer!");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF00AAFF, "*ERROR: Player is not connected,Invalid playerid Or Is Yourself!");
    else if(IsPlayerInRangeOfPoint(id, 10, x, y, z)) return SendClientMessage(playerid, COLOR_GREY, "Player is not close enough!");
    else
    {
        GetPlayerName(playerid, name, sizeof(name));
        GetPlayerName(id, idname, sizeof(idname));
        GetPlayerPos(strval(tmp),x,y,z);
        GetPlayerFacingAngle(playerid, angle);
       
        TogglePlayerControllable(id,false);
        SendClientMessage(playerid, COLOR_GREY, "You Have Cuffed Citizen %s(%d)!");
        SendClientMessage(id, COLOR_GREY, "You've Been Cuffed By Officer %s(%d)!");
        SetPlayerPos(playerid,x+0.5,y,z);
        SetPlayerFacingAngle(playerid, angle);
        OnePlayAnim(playerid, "PYTHON", "python_crouchreload", 2.0, 0, 0, 0, 0, 0);
        IsAnim[playerid] = 1;
    }
    return 1;
}
Reply


Messages In This Thread
facing angle - by Kar - 10.07.2010, 14:23
Re: facing angle - by OverSwap - 10.07.2010, 14:25
Re: facing angle - by Kar - 10.07.2010, 14:26
Re: facing angle - by OverSwap - 10.07.2010, 14:31
Re: facing angle - by Kar - 10.07.2010, 14:38
Re: facing angle - by OverSwap - 10.07.2010, 14:42

Forum Jump:


Users browsing this thread: 3 Guest(s)