Jump to content
  • 0

Ma poate ajuta cineva la anti-troll ? OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype);



Am o problema

in anti troll .pwn scrie asa:

OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype);
Type 1: Teleporting between vehicles (can give cheaters chance to control other's players) (also lag cheat detected here).
Type 2: Control other player's cars or spin/rotate (Done by checking the player's actual vehicle).
Type 3: Fast kick/rotate or teleporting inside drivers. (detectd by position change)
Type 4: Teleporting inside a vehicle illegally as a driver (without PutPlayerInVehicle or OnPlayerEnterVehicle).
Type 5: Teleporting inside a vehicle illegally as a passenger (without PutPlayerInVehicle or OnPlayerEnterVehicle).
Type 6: Remote kick a player by tping a vehicle inside of him. (Too fast the server reads it as an unoccupied vehicle).

si nu stiu ce sa fac

 eu il am asa :

public OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype)
    new KickString[80], cheatername[MAX_PLAYER_NAME]; // Kicking message and cheater's name
    GetPlayerName(playerid, cheatername, sizeof(cheatername));//Saving cheater's name in a string
    if(trolledid != INVALID_PLAYER_ID)// If the trolled person is valid
        SendClientMessage(trolledid, -1, "You were trolled but the cheater was taken care of");//Inform him
        format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d player %d", cheatername, trolltype, vehicleid, trolledid);//Kick with a reasonable message
    else format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d", cheatername, trolltype, vehicleid);//If no one was trolled kick the troller normally
    SendClientMessageToAll(-1, KickString);//Sending the finalized string
    Kick(playerid);//Kicking the cheater
    return 1;

si imi da error.

Va rog

Ma poate ajuta cnv ?


Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Um am cautat si am gasit ca este de fapt o "familie" de include pentru acest anti cheat

Acest fs contine cumva si #include <Anti_cheat_pack>  cumva? Sau ceva asemanator?

Ce am gasit: https://github.com/samp-anti-cheat/Anti_cheat_pack contine toate include necesare pentru a face un anti cheat. In test.pwn deasemenea este si un exemplu

Totusi nu inteleg de ce ar zice ca nu exista OnPlayerCarTroll pentru ca daca creezi ceva chiar si public devine o functie valida si existenta

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.