Jump to content
  • 0

Problema !


CoSmInUuTzZ

Question

7 answers to this question

Recommended Posts

[pawn]public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {

    if(damagedid == INVALID_PLAYER_ID || !CheckFireArm(GetPlayerWeapon(playerid)) || GetPlayerTargetPlayer(playerid) != INVALID_PLAYER_ID) return 1;

    new count = GetPVarInt(playerid, "aimcount"), ticks = GetPVarInt(playerid, "aimtick"), currtick = GetTickCount();

    if(currtick - ticks <= 10000 && count + 1 >= MAX_AIM_TICKS) {

        new msg[144], name[MAX_PLAYER_NAME];

        GetPlayerName(playerid, name, MAX_PLAYER_NAME);

        format(msg, 144, "%s[%i] a primit kick pentru suspectarea in folosirea Aim / Joypad.", name, playerid);

        SendClientMessageToAll(-1, msg);

        Kick(playerid); // acordam kick cheaterului

        // Atentie! Daca veti dori sa schimbati kick intr-o alta sanctiune (de exemplu: un simplu mesaj) — adaugati aici stergerea "PVAR"-urilor si anularea variabilei "count" (ca si in codul operatorului "else if" de mai jos)

    }

    else if(currtick - ticks > 10000) {

        DeletePVar(playerid, "aimcount");

        DeletePVar(playerid, "aimtick");

        count = 0;

        currtick = GetTickCount();

    }

    SetPVarInt(playerid, "aimcount", count + 1);

    SetPVarInt(playerid, "aimtick", currtick);

    return 1;

}

CheckFireArm(weaponid) {

    switch(weaponid) {

        case 16..39, 41..43: return 1;

        default: return 0;

    }

    return 0;

}[/pawn]

Link to comment
Share on other sites

Eroarea iti spune ca functia OnPlayerGiveDamage a mai fost definita odata. Cauto si stergeo.

Linia care iti da erroare?Nimic?Crezi ca putem cu un singur screenshot sa iti spunem exact?Gata,stiu pune la inceputul scriptului #error R.i.P!

Buga daca stiai macar putin scripting sau engleza iti dadeai seama ce avea. Ai warn.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

[pawn]public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)

{

if(Tazer[playerid] == 1 && GetPlayerWeapon(playerid) == TAZE_WEAPON)

{

    new Float:health,losehp;

    GetPlayerHealth(damagedid,health);

    losehp = TAZE_LOSEHP;

    if(Tazed[damagedid] == 1) return 1;

    new Float:x, Float:y, Float:z;

    GetPlayerPos(damagedid, x, y, z);

    ClearAnimations(damagedid);

    ApplyAnimation(damagedid,"PED","KO_skid_front",4.1,0,1,1,1,0);

    //Spark[damagedid] = CreateObject(TAZE_SPARK, x, y, z-3, 0, 0, 0);

    //SetTimerEx("DestroySpark", TAZE_DESTROY, 0, "i", damagedid);

    SetTimerEx("TazedRemove", TAZE_TIMER, 0, "i", damagedid);

    TogglePlayerControllable(damagedid, 0);

    Tazed[damagedid] = 1;

    if(losehp) {} else SetPlayerHealth(damagedid, health+amount);

}

return 1;

}

[/pawn]

Aici o mai am odata .

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.