Jump to content
  • 0

Problema !



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;


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.




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;


    losehp = TAZE_LOSEHP;

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

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

    GetPlayerPos(damagedid, x, y, z);



    //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;



Aici o mai am odata .

Link to comment
Share on other sites

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.