Kill reward Not Working properly
#1

If i kill an player me and my clan members should get money. But None get. When the Other guy kills he gets the reward.
Here is the code:
PHP код:
if(ccashreward == 1)
        {
            foreach(new 
Player)
            {
                if(
GetPlayerClanId(i) == GetPlayerClanId(killerid))
                {
                    new 
string1[150],string[150];
                    new 
name1[150];
                    
GetPlayerName(iname1sizeof(name1));
                    
format(string1,sizeof(string1),"No Reward For Killing Own Clan Member");
                    
SendClientMessage(playerid,COLOR_RED,string1);
                    
format(string,sizeof(string),"%s has killed %s",name1,Playername);
                    
SendMessageToClanMembers(playerid,COLOR_RED,string);
                }
                else
                {
                    new 
string[150];
                    new 
moneyreward 1000+random(2001);
                    
format(stringsizeof(string), "[Clan]: You've been rewarded %i$ from %s's kill!"moneyrewardPlayername);
                    
SendClientMessage(i0x00FF7FAAstring);
                    
GivePlayerMoney(imoneyreward);
                }
            }
            return 
1;
        } 
Reply


Messages In This Thread
Kill reward Not Working properly - by Jokers98s - 28.01.2018, 08:06
Re: Kill reward Not Working properly - by iSteve - 28.01.2018, 09:20
Re: Kill reward Not Working properly - by Jokers98s - 28.01.2018, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)