Count always stay 0
#1

why 'Count' always stay 0?

pawn Код:
// Chicken Attack
    if(Chicken[playerid]){
    MSG(playerid,C_GREEN,"[Chicken] ъчу бдцмзд");
    new Count;
    PetAttacked[playerid] = true;
    SetTimerEx("PetAtkDealy", 6000, false, "i", playerid);
    for(new i=0; i<MAX_PLAYERS; i++){
    GetPlayerPos(playerid,pX,pY,pZ);
    if(IsPlayerInRangeOfPoint(i,7,pX,pY,pZ) && i != playerid){
    GivePlayerHealth(i,-70);
    new Float:iHealth;
    GetPlayerHealth(i,iHealth);
    if(iHealth <=0){Count++; DOF2_SetInt(pFile(i),"Deaths",DOF2_GetInt(pFile(i),"Deaths")+1);}
    MSG(i,C_RED,"[Chicken] -70 Health");}}
    DOF2_SetInt(pFile(playerid),"Kills",DOF2_GetInt(pFile(playerid),"Kills")+Count);
    DOF2_SetInt(pFile(playerid),"TotalKills",DOF2_GetInt(pFile(playerid),"TotalKills")+Count);
    format(String,sizeof(String),"Count: %i",Count);
    MSG(playerid,C_RED,String);}
Reply


Messages In This Thread
Count always stay 0 - by Lirbo - 26.04.2015, 19:37
Re: Count always stay 0 - by Konstantinos - 26.04.2015, 19:42
Re: Count always stay 0 - by Lirbo - 26.04.2015, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)