SAMP id 0 cant /tk id 1 & same with /ar
#8

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
Add This:
pawn Код:
if(ID != player) //this checks if the ID from the loop isnt you, if it was you it will avoid it.
{
}
still no effect he full command

i appreciate you time thanks

PHP код:
cmd(tkplayeridparams[])
{
    foreach(new 
ID Player)
    {
    if(
ID != playerid//this checks if the ID from the loop isnt you, if it was you it will avoid it.
    
{
    }
    if(!
IsCop(playerid))
        return 
SendClientMessage(playeridCOLOR_RED"Only Cops/Army can use this command.");
    new 
string[120];
    if(
GetDistanceBetweenPlayers(playeridID) > 4)
    {
        return 
SendClientMessage(playeridCOLOR_RED"That player is too far away to Ticket.");
    }
    new 
pwl GetPlayerWantedLevel(ID);
    if(
pwl == 1)
    {
        
format(string120"[COP ACTION] You have been fined by officer %s. You have been charged $1,000"PlayerInfo(playerid));
        
SendClientMessage(IDCOLOR_DODGERBLUEstring);
        
format(string120"[COP ACTION] You have fined %s. You have recieved a collection prize."PlayerInfo(ID));
        
SendClientMessage(playeridCOLOR_DODGERBLUEstring);
        
format(string120"[DISPATCH] Officer %s has fined %s. He is no longer wanted."PlayerInfo(playerid), PlayerInfo(ID));
        
SendCopMessage(string);
        
SetPlayerWantedLevel(ID0);
        
IncreaseScore(playerid1);
        
GivePlayerMoney(playerid2500);
        
GivePlayerMoney(ID, -1000);
    }
    if(
pwl == 2)
    {
         
format(string120"[COP ACTION] You have been fined by officer %s. You have been charged $2,000"PlayerInfo(playerid));
        
SendClientMessage(IDCOLOR_DODGERBLUEstring);
        
format(string120"[COP ACTION] You have fined %s. You have recieved a collection prize."PlayerInfo(ID));
        
SendClientMessage(playeridCOLOR_DODGERBLUEstring);
        
format(string120"[DISPATCH] Officer %s has fined %s. He is no longer wanted."PlayerInfo(playerid), PlayerInfo(ID));
        
SendCopMessage(string);
        
SetPlayerWantedLevel(ID0);
        
IncreaseScore(playerid1);
        
GivePlayerMoney(playerid2500);
        
GivePlayerMoney(ID, -2000);
    }
     if(
pwl == 3)
    {
         
format(string120"[COP ACTION] You have been fined by officer %s. You have been charged $3,000"PlayerInfo(playerid));
        
SendClientMessage(IDCOLOR_DODGERBLUEstring);
        
format(string120"[COP ACTION] You have fined %s. You have recieved a collection prize."PlayerInfo(ID));
        
SendClientMessage(playeridCOLOR_DODGERBLUEstring);
        
format(string120"[DISPATCH] Officer %s has fined %s. He is no longer wanted."PlayerInfo(playerid), PlayerInfo(ID));
        
SendCopMessage(string);
        
SetPlayerWantedLevel(ID0);
        
IncreaseScore(playerid1);
        
GivePlayerMoney(playerid2500);
        
GivePlayerMoney(ID, -3000);
    }
    else
    {
        if(
pwl == 0)
        {
            return 
SendClientMessage(playeridCOLOR_YELLOW"["COL_GREY"Error"COL_YELLOW"]"COL_GREY":"COL_LRED"player is innocent!");
        }
        if(
pwl == 4)
        {
            return 
SendClientMessage(playeridCOLOR_YELLOW"["COL_GREY"Error"COL_YELLOW"]"COL_GREY":"COL_LRED"You only can give ticket to wanted players of 1 to 3!");
        }
        if(
pwl == 5)
        {
            return 
SendClientMessage(playeridCOLOR_YELLOW"["COL_GREY"Error"COL_YELLOW"]"COL_GREY":"COL_LRED"You only can give ticket to wanted players of 1 to 3!");
        }
        if(
pwl == 6)
        {
            return 
SendClientMessage(playeridCOLOR_YELLOW"["COL_GREY"Error"COL_YELLOW"]"COL_GREY":"COL_LRED"You only can give ticket to wanted players of 1 to 3!");
        }
    }
    }
    return 
1;

Reply


Messages In This Thread
SAMP id 0 cant /tk id 1 & same with /ar - by UserName31 - 23.07.2014, 03:05
Re: SAMP id 0 cant /tk id 1 & same with /ar - by [D]ry[D]esert - 23.07.2014, 03:11
Re: SAMP id 0 cant /tk id 1 & same with /ar - by UserName31 - 23.07.2014, 03:14
Re: SAMP id 0 cant /tk id 1 & same with /ar - by [D]ry[D]esert - 23.07.2014, 03:16
Re: SAMP id 0 cant /tk id 1 & same with /ar - by UserName31 - 23.07.2014, 03:17
Re: SAMP id 0 cant /tk id 1 & same with /ar - by [D]ry[D]esert - 23.07.2014, 03:21
Re: SAMP id 0 cant /tk id 1 & same with /ar - by [D]ry[D]esert - 23.07.2014, 03:42
Re: SAMP id 0 cant /tk id 1 & same with /ar - by UserName31 - 23.07.2014, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)