spamming
#1

look at script when civil can shoot a plaayer or cop so they spam i want make it they don't spam

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    if(
GetTeam{playerid} == CLASS_CIV && IsPlayerHoldingAGun(playerid) == 1)
    {
        foreach(
Playeri)
         {
            
shotsfired[playerid] += 2;
            if(
shotsfired[playerid] == && shotsfired[playerid] != 1)
            {
                new 
current_zonestring[150];
                
current_zone Player_Zone[playerid];
                 
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 3);
                
format(stringsizeof(string), "Crime in progress! %s (%d) has assaulted %s (%d) with a deadly weapon - Location:  %s"GetName(playerid), playeridGetName(damagedid), damagedidZoneNames[current_zone][zone_name]);
                
CopRadio(LIGHTBLUEstring);
                
format(fstrsizeof(fstr), "Committed A Crime: Assault With A Deadly Weapon - Wanted Level %d - Ticketable"GetPlayerWantedLevel(playerid));
                
SendClientMessage(playeridYELLOWstring);
                
shotsfired[playerid] = 1;
                
shotsfired{playerid} = SetTimerEx("shotsfired"100000true"d"i);
            }
            else
             {
                new 
current_zonestring[150];
                  
current_zone Player_Zone[playerid];
                
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 6);
                
format(stringsizeof(string), "Crime in progress! %s (%d) has assaulted %s (%d) with a deadly weapon - Location:  %s"GetName(playerid), playeridGetName(damagedid), damagedidZoneNames[current_zone][zone_name]);
                
CopRadio(LIGHTBLUEstring);
                
format(fstrsizeof(fstr), "Committed A Crime: Assault With A Deadly Weapon - Wanted Level %d - Arrestable"GetPlayerWantedLevel(playerid));
                
SendClientMessage(playeridREDfstr);
                
shotsfired[playerid] = 1;
                
shotsfired{playerid} = SetTimerEx("shotsfired"100000true"d"i);
            }
        }
    }
    return 
1;

i added timer system but didn;t worked. "shotsfired{playerid} = SetTimerEx("shotsfired", 100000, true, "d", i);"

and pls make it they dnt spamming after 3 shoot and then see that msg to player
Reply


Messages In This Thread
spamming - by pelani - 11.02.2013, 23:17
Re: spamming - by MP2 - 11.02.2013, 23:52
Re: spamming - by pelani - 12.02.2013, 08:43

Forum Jump:


Users browsing this thread: 2 Guest(s)