Special action no work T.T
#1

hi friend CUFFED ACTION no works :'c

Код:
CMD:cuff(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage:{FFFFFF} /cuff [Part of Name/ID]");
    
   	if(GetPlayerTeam(playerid) == TEAM_CIVILIAN)
 	{
 	    SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} Only Cops Can Use This Command.");
 	    return 1;
 	}
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} You cannot cuffed a suspect while in a vehicle. Exit the vehicle first.");
	    return 1;
	}
	if(GetPlayerState(targetid) == PLAYER_STATE_DRIVER || GetPlayerState(targetid) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} You cannot cuffed a suspect they are in a vehicle. Get them to exit the vehicle first.");
	    return 1;
	}
	if(GetPlayerWantedLevel(targetid) < 1)
	{
	    SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} Player no have wanted level!");
	    return 1;
	}
	if(Tazed[targetid] == 0)
	{
	    SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} First taze the player!");
	    return 1;
	}

    if(IsPlayerConnected(targetid))
    {
               if(GetPlayerDistanceFromPlayer(playerid, targetid) < 3)
               {
                    new str[512];
                    new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    new target[MAX_PLAYER_NAME];
                    GetPlayerName(targetid, target, sizeof(target));
                    format(str, sizeof(str), "[CUFFED]{FFFFFF} You have cuffed %s!",target);
                    SendClientMessage(playerid, COLOR_SERVER, str);
                    format(str, sizeof(str), "[CUFFED]{FFFFFF} You have been cuffed by %s!",name);
                    SendClientMessage(targetid, COLOR_SERVER, str);
                    SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
                   	SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);
                    return 1;
               }

	}
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)