Fail anims D:
#1

here on the commands and it wont force the anims to the player D:

pawn Код:
dcmd_arrest(playerid,params[]) {
    new player1, target[MAX_PLAYER_NAME], string[128];
    new rand = random( 8 );
    new Float:x, Float:y, Float:z; GetPlayerPos(player1,x,y,z);
    if(gTeam[playerid] == TEAM_COPS) {
        if(player1 == INVALID_PLAYER_ID || player1 == playerid || !IsPlayerConnected(player1))
            return SendClientMessage(playerid,red,"Invalid playerid");
        if(CInfo[player1][Jailed] == 1) return SendClientMessage(playerid,red,"Player already in jail!");
        if(CInfo[player1][Cuffed] == 0) return SendClientMessage(playerid,red,"Player Isn't Cuffed!");
        new tmp[256], Index; tmp = strtok(params,Index);
        if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /arrest [playerid]");
        player1 = strval(tmp);

        GetPlayerName(player1, target, sizeof(target));

        format(string,sizeof(string),"%s has arrested %s",playerid, target);
        SendClientMessageToAll(blue,string);
        TogglePlayerControllable(player1,1);
        SetPlayerSpecialAction(player1,SPECIAL_ACTION_HANDSUP);
       
        SetPlayerCameraPos(player1,x+3,y,z); SetPlayerCameraLookAt(player1,x,y,z);
        SetPlayerPos(player1,Jail[rand][0],Jail[rand][1],Jail[rand][2]);
        SetPlayerInterior(player1,1);
        CInfo[player1][Cuffed] = 0;
        CInfo[player1][Jailed] = 0;
        CInfo[player1][Tazed] = 0;
    } else return SendClientMessage(playerid,red,"ERROR: Only cops can use this command!");
    return 1;
}

dcmd_taze(playerid,params[])
{
    #pragma unused params
    new targetName[MAX_PLAYER_NAME],target,string[128];
    new Float:X,Float:Y,Float:Z;
    GetPlayerName(target,targetName,MAX_PLAYER_NAME);
    if(gTeam[playerid] == TEAM_COPS)
    {
        if(CInfo[target][Jailed] == 1) return SendClientMessage(playerid,red,"Player already in jail!");
        if(CInfo[target][Cuffed] == 1) return SendClientMessage(playerid,red,"Player already is Cuffed!");
        if(CInfo[target][Tazed] == 1) return SendClientMessage(playerid,red,"Player already Been Tazed!");
        if(sscanf(params,"u",target))
            return SendClientMessage(playerid,red,"USAGE: /taze [ID]");
        if(target == INVALID_PLAYER_ID || target == playerid || !IsPlayerConnected(target))
            return SendClientMessage(playerid,red,"Invalid playerid");
        if(IsPlayerInAnyVehicle(playerid))
            return SendClientMessage(playerid,red,"You can't taze from vehicle!");
        if(IsPlayerInAnyVehicle(target))
            return SendClientMessage(playerid,red,"That player is in vehicle, you can't taze him!");
        GetPlayerPos(target,X,Y,Z);
        if(!IsPlayerInRangeOfPoint(playerid,3.00,X,Y,Z))
            return SendClientMessage(playerid,red,"You are too far away from him!");
        format(string, sizeof(string), "%s has been tazed by cop %s",targetName,PlayerName(playerid));
        SendClientMessageToAll(blue,string);
        SendClientMessage(playerid,blue,"Tazed");
        format(string, sizeof(string), "Tazed by %s!",PlayerName(playerid));
        SendClientMessage(target,blue,string);
        CInfo[target][Tazed] = 1;
        ApplyAnimation(target,"SWEET","Sweet_injuredloop",4.1,1,1,1,1,1);
        ApplyAnimation(target,"SWEET","Sweet_injuredloop",4.1,1,1,1,1,1);
        ApplyAnimation(target,"SWEET","Sweet_injuredloop",4.1,1,1,1,1,1);
        ApplyAnimation(target,"SWEET","Sweet_injuredloop",4.1,1,1,1,1,1);
    } else return SendClientMessage(playerid,red,"ERROR: Only cops can use this command!");
    return 1;
}

dcmd_cuff(playerid,params[]) {
    #pragma unused params
    new target, string[128];
    if(gTeam[playerid] == TEAM_COPS)
    {
        if(sscanf(params,"u",target))
            return SendClientMessage(playerid,red,"USAGE: /cuff [ID]");
        if(target == INVALID_PLAYER_ID || target == playerid || !IsPlayerConnected(target))
            return SendClientMessage(playerid,red,"Invalid playerid");
        if(CInfo[target][Jailed] == 1) return SendClientMessage(playerid,red,"Player already in jail!");
        if(CInfo[target][Cuffed] == 1) return SendClientMessage(playerid,red,"Player already is Cuffed!");
        if(CInfo[target][Tazed] == 0) return SendClientMessage(playerid,red,"Player has not been Tazed!");
        format(string, sizeof(string), "%s(%d) has been cuff by cop %s(%d)",PlayerName(target),target,PlayerName(playerid),playerid);
        SendClientMessageToAll(blue,string);
        format(string, sizeof(string), "Cuffed by %s!",PlayerName(playerid));
        SendClientMessage(playerid,red,string);
        TogglePlayerControllable(target,0);
        CInfo[target][Cuffed] = 1;
        CInfo[target][Tazed] = 0;
        ApplyAnimation(target,"ON_LOOKERS","panic_hide",4.1,1,1,1,1,1);
        ApplyAnimation(target,"ON_LOOKERS","panic_hide",4.1,1,1,1,1,1);
    } else return SendClientMessage(playerid,red,"ERROR: Only cops can use this command!");
    return 1;
}
Reply
#2

........
Quote:
Originally Posted by LilGunna
Посмотреть сообщение
bump skittle bump..
help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)