Help (Killing Medals)
#4

oh , i forgot to edit it for ya , take this :
pawn Code:
#include <a_samp>

new Kills[MAX_PLAYERS];
new st[128];
new name[24];
new Killername[24];

#define COLOR_YELLOW 0xFFFF00AA

public OnPlayerDeath(playerid,killerid,reason)
{
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,Killername,sizeof(Killername));
    if(Kills[playerid] > 2)
    {
        GivePlayerMoney(killerid,3000*GetPlayerWantedLevel(playerid));
        format(st,sizeof(st),"%s was awarded %d for killing %s wanted level %d",Killername,3000*GetPlayerWantedLevel(playerid),name,GetPlayerWantedLevel(playerid));
        SendClientMessageToAll(COLOR_YELLOW,st);
    }
    Kills[playerid] = 0;
    Kills[killerid]++;
    SetPlayerWantedLevel(playerid,0);
    if(Kills[killerid] == 1)
    {
        format(st,sizeof(st),"%s is on First Kill!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,1);
    }
    if(Kills[killerid] == 2)
    {
        format(st,sizeof(st),"%s is on Double Kill!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,2);
    }
    if(Kills[killerid] == 3)
    {
        format(st,sizeof(st),"%s is on Killing Spree!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,3);
    }
    if(Kills[killerid] == 4)
    {
        format(st,sizeof(st),"%s is on Monster Kill!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,4);
    }
    if(Kills[killerid] == 5)
    {
        format(st,sizeof(st),"%s is Hitman!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,5);
    }
    if(Kills[killerid] == 6)
    {
        format(st,sizeof(st),"%s is on Kill Dead!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,6);
    }
    if(Kills[killerid] == 7)
    {
        format(st,sizeof(st),"%s is Head Shooter!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,7);
    }
    if(Kills[killerid] == 8)
    {
        format(st,sizeof(st),"%s is GodLike!",Killername);
        SendClientMessageToAll(0xFFFFFFFF,st);
        SetPlayerWantedLevel(killerid,8);
    }
    return 1;
}
Reply


Messages In This Thread
Help (Killing Medals) - by ServerScripter - 27.08.2011, 22:37
Re: Help (Killing Medals) - by Amel_PAtomAXx - 27.08.2011, 22:41
Re: Help (Killing Medals) - by ServerScripter - 27.08.2011, 22:55
Re: Help (Killing Medals) - by Amel_PAtomAXx - 27.08.2011, 23:09
Re: Help (Killing Medals) - by 0_o - 27.08.2011, 23:13

Forum Jump:


Users browsing this thread: 1 Guest(s)