Anti Vehicle Abusive kill xD
#2

pawn Код:
new carkill[MAX_PLAYERS], bool:rhinod[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInVehicle(killerid, 432)) // is he in rhino?
    {
        carkill[killerid]++;
    }
   
    if(carkill[killerid] >= 5) // he killed more than 5 people with rhino
    {
        SetTimerEx("RhinoDisabled", 1000*60*2, false, "d", killerid)
        RemovePlayerFromVehicle(killerid);
        rhinod[killerid] = true;
        carkill[killerid] = 0; // the carkill gets reset
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger == 0) // is he driver?
    {
        if(vehicleid == 432) // is it a rhino?
        {
            if(rhinod[playerid] == true) // is rhino disabled for him?
            {
                RemovePlayerFromVehicle(playerid); // remove him from it
            }
        }
    }
    return 1;
}

forward RhinoDisabled(playerid)
public RhinoDisabled(playerid)
{
    rhinod[playerid] = false;
    return 1;
}
Reply


Messages In This Thread
Anti Vehicle Abusive kill xD - by James124 - 12.09.2010, 08:45
Re: Anti Vehicle Abusive kill xD - by Claude - 12.09.2010, 08:56
Re: Anti Vehicle Abusive kill xD - by James124 - 12.09.2010, 09:05
Re: Anti Vehicle Abusive kill xD - by Claude - 12.09.2010, 09:06
Re: Anti Vehicle Abusive kill xD - by James124 - 12.09.2010, 09:08
Re: Anti Vehicle Abusive kill xD - by Claude - 12.09.2010, 09:10
Re: Anti Vehicle Abusive kill xD - by James124 - 12.09.2010, 09:12
Re: Anti Vehicle Abusive kill xD - by James124 - 12.09.2010, 09:59
Re: Anti Vehicle Abusive kill xD - by Jefff - 12.09.2010, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)