Kenix Posted March 12, 2011 Posted March 12, 2011 please help I want to do that after a knife displays. but script not work function ZombieKillmessage(ammo, attacker, weapon, bodypart) if ( weapon == 4 ) then local sourceTeam,killerTeam = getPlayerTeam(source),getPlayerTeam(killer) local rK,gK,bK = getPlayerNametagColor(killer) local rS,gS,bS = getPlayerNametagColor(source) exports.killmessages:outputMessage( {getPlayerName(killer),{"padding",width=3},{"icon",id=waffe},{"padding",width=3}, {"icon",id=256},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)}, getRootElement(),rK,gK,bK) end end addEventHandler("onPlayerDamage",getRootElement(),ZombieKillmessage)
Kenix Posted March 13, 2011 Author Posted March 13, 2011 help please may be problem in outputMessage use debug no errors function ZombieKillmessage(ammo, attacker, weapon, bodypart) if ( weapon == 4 ) then local sourceTeam,killerTeam = getPlayerTeam(source),getPlayerTeam(attacker) local rK,gK,bK = getPlayerNametagColor(attacker) local rS,gS,bS = getPlayerNametagColor(source) exports.killmessages:outputMessage( {getPlayerName(attacker),{"padding",width=3},{"icon",id=waffe},{"padding",width=3}, {"icon",id=256},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)}, getRootElement(),rK,gK,bK) end end addEventHandler("onPlayerDamage",getRootElement(),ZombieKillmessage)
Moderators Citizen Posted March 13, 2011 Moderators Posted March 13, 2011 If we don't reply it's maybe because we don't know how to use this function. But I can share this link: https://forum.multitheftauto.com/viewtopic.php?f=91&t=26515&p=304123&hilit=exports.killmessages%3AoutputMessage#p304123 It's the only topic where I found it. Sorry
Wojak Posted March 15, 2011 Posted March 15, 2011 volk-rus i dont know if someone tell you this before, but you can not make a script by copying random parts of other people code... i mean this exports.killmessages:outputMessage( {getPlayerName(attacker),{"padding",width=3},{"icon",id=waffe},{"padding",width=3}, {"icon",id=256},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)}, getRootElement(),rK,gK,bK) it is a copy, paste from the link Citizen give you, and you even dont know whot this code do (not many people know, as there is no wiki page for killmessages) i see at lest two errors in youre cod ("use debug no errors" my ass) function ZombieKillmessage(ammo, attacker, weapon, bodypart) "ammo" contains "atacker" "atacker" contains "weapon" "weapon" contains " bodypart" " bodypart" contains hp loss https://wiki.multitheftauto.com/wiki/OnPlayerDamage also you use "waffe" that is not define in you're script (waffe means weapon in german) exports.killmessages:outputMessage({getPlayerName(attacker),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)},getRootElement(),rK,gK,bK) first parameter is "tekst" and it can be a string or a table, second parameter is "visible for" and it can be ane player, or root element for all players, last parameters are "red","green","blue" in the table {"padding",width=3} is a 3 pixel space, rest should be obvious
Kenix Posted March 17, 2011 Author Posted March 17, 2011 volk-rus i dont know if someone tell you this before, but you can not make a script by copying random parts of other people code...i mean this exports.killmessages:outputMessage( {getPlayerName(attacker),{"padding",width=3},{"icon",id=waffe},{"padding",width=3}, {"icon",id=256},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)}, getRootElement(),rK,gK,bK) it is a copy, paste from the link Citizen give you, and you even dont know whot this code do (not many people know, as there is no wiki page for killmessages) i see at lest two errors in youre cod ("use debug no errors" my ass) function ZombieKillmessage(ammo, attacker, weapon, bodypart) "ammo" contains "atacker" "atacker" contains "weapon" "weapon" contains " bodypart" " bodypart" contains hp loss https://wiki.multitheftauto.com/wiki/OnPlayerDamage also you use "waffe" that is not define in you're script (waffe means weapon in german) exports.killmessages:outputMessage({getPlayerName(attacker),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"color",r=rS,g=gS,b=bS},getPlayerName(source)},getRootElement(),rK,gK,bK) first parameter is "tekst" and it can be a string or a table, second parameter is "visible for" and it can be ane player, or root element for all players, last parameters are "red","green","blue" in the table {"padding",width=3} is a 3 pixel space, rest should be obvious thanks a lot dude, this script is running)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now