This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Showing Sprites


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 05-19-2024 , 14:37   Showing Sprites
Reply With Quote #1

How can i show the sprites to the killer?

Im not sure if its the thing with write_byte or not, and if its that can someone show me an example?

HTML Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Kill Cards"
#define VERSION "1.0"
#define AUTHOR "tedaimlocks"

new iKills[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	RegisterHam(Ham_Killed, "player", "PlayerKilled");
        register_logevent("Logevent_RoundStart", 2, "1=Round_Start");
}

public PlayerKilled(iVictim, iAttacker) {
    if (is_user_connected(iAttacker) && iAttacker != iVictim) {
        iKills[iAttacker]++;

        if (iKills[iAttacker] == 1) {
            client_print(iAttacker, print_chat, "You now have %d kill.", iKills[iAttacker]);
            // Show 1st kill card sprite
        }
        else if (iKills[iAttacker] == 2) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 2nd kill card sprite
        }
        else if (iKills[iAttacker] == 3) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 3rd kill card sprite
        }
        else if (iKills[iAttacker] == 4) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 4th kill card sprite
        }
        else if (iKills[iAttacker] == 5) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 5th kill card sprite
        }
        else if (iKills[iAttacker] == 6) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 6th kill card sprite
        }
        else if (iKills[iAttacker] == 7) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 7th kill card sprite
        }
        else if (iKills[iAttacker] == 8) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 8th kill card sprite
        }
        else if (iKills[iAttacker] == 9) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 9th kill card sprite
        }
        else if (iKills[iAttacker] >= 10) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 10th kill card sprite
        }

    }
}

public Logevent_RoundStart() {
    for(new i = 1; i <= get_maxplayers(); i++) {
        iKills[i] = 0;
    }
}

public client_disconnect(id) {
    iKills[id] = 0;
}

public client_putinserver(id) {
    iKills[id] = 0;
}

Last edited by tedaimlocks; 05-19-2024 at 14:50.
tedaimlocks is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-19-2024 , 16:10   Re: Showing Sprites
Reply With Quote #2

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Last edited by v120kaaimcfg; Yesterday at 12:32.
v120kaaimcfg is offline
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 05-20-2024 , 03:43   Re: Showing Sprites
Reply With Quote #3

I didnt underetand anything from that
tedaimlocks is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-20-2024 , 09:53   Re: Showing Sprites
Reply With Quote #4

Quote:
Originally Posted by tedaimlocks View Post
How can i show the sprites to the killer?

Im not sure if its the thing with write_byte or not, and if its that can someone show me an example?

HTML Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Kill Cards"
#define VERSION "1.0"
#define AUTHOR "tedaimlocks"

new iKills[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	RegisterHam(Ham_Killed, "player", "PlayerKilled");
        register_logevent("Logevent_RoundStart", 2, "1=Round_Start");
}

public PlayerKilled(iVictim, iAttacker) {
    if (is_user_connected(iAttacker) && iAttacker != iVictim) {
        iKills[iAttacker]++;

        if (iKills[iAttacker] == 1) {
            client_print(iAttacker, print_chat, "You now have %d kill.", iKills[iAttacker]);
            // Show 1st kill card sprite
        }
        else if (iKills[iAttacker] == 2) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 2nd kill card sprite
        }
        else if (iKills[iAttacker] == 3) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 3rd kill card sprite
        }
        else if (iKills[iAttacker] == 4) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 4th kill card sprite
        }
        else if (iKills[iAttacker] == 5) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 5th kill card sprite
        }
        else if (iKills[iAttacker] == 6) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 6th kill card sprite
        }
        else if (iKills[iAttacker] == 7) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 7th kill card sprite
        }
        else if (iKills[iAttacker] == 8) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 8th kill card sprite
        }
        else if (iKills[iAttacker] == 9) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 9th kill card sprite
        }
        else if (iKills[iAttacker] >= 10) {
            client_print(iAttacker, print_chat, "You now have %d kills.", iKills[iAttacker]);
            // Show 10th kill card sprite
        }

    }
}

public Logevent_RoundStart() {
    for(new i = 1; i <= get_maxplayers(); i++) {
        iKills[i] = 0;
    }
}

public client_disconnect(id) {
    iKills[id] = 0;
}

public client_putinserver(id) {
    iKills[id] = 0;
}
https://github.com/djearthquake/amxx...sprite_fun.sma
Shows how to use env_sprite, animated without black block background.
__________________
DJEarthQuake is offline
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 05-20-2024 , 14:53   Re: Showing Sprites
Reply With Quote #5

its been solved
tedaimlocks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode