Help Hud Sprite on screen
|
|
Grade: Trainee Blue | Date: Sunday, 23 September 12, 8:18 PM | Message # 1 |
Trainee
Clan: Member
Experience: 5
Status: Offline
| How to make hud sprite show on the screen like this? sorry im a newbie start learning the script please teach me or how to make procedure or sample! thanks
Code #include <amxmodx> #include <dhudsprite>
public plugin_init() { register_plugin( "Hud Sprite","1.0","Testing"); register_clcmd( "say /test", "ClientCommand_Test" ); } public client_putinserver(id){ show_sprite(id)
public ClientCommand_Test( client ) { public show_sprite(id){ set_task(0.5, "show_sprite", id) if(!is_user_connected(id) || is_user_bot(id) || !MH_IsMetaHookPlayer(id)) return; MH_DrawHudsprite(id, "Hud_sprite", TOPLEFT, TOPCENTER, TOPRIGHT, 0, 0, 1) }
|
|
| |
Grade: Commander DavidJr | Date: Monday, 24 September 12, 8:48 PM | Message # 2 |
Commander
Clan: Executive
Experience: 2256
Status: Offline
| Wrong include, why did you use dhudsprite module?
You put metahook's native here Code public ClientCommand_Test( client ) { public show_sprite(id){ set_task(0.5, "show_sprite", id) if(!is_user_connected(id) || is_user_bot(id) || !MH_IsMetaHookPlayer(id)) return; MH_DrawHudsprite(id, "Hud_sprite", TOPLEFT, TOPCENTER, TOPRIGHT, 0, 0, 1) }
Try this: Code #include <amxmodx> #include <metahook>
posted via BlackBerry
Personal Site | CSF Website
|
|
| |
Grade: Trainee Blue | Date: Monday, 24 September 12, 10:07 PM | Message # 3 |
Trainee
Clan: Member
Experience: 5
Status: Offline
| sori im just a newbie start learning script cannot complie i use dhudsprite to metahook but failed to compile
|
|
| |
Grade: Brigadir Khairul169 | Date: Tuesday, 25 September 12, 3:28 PM | Message # 4 |
Brigadir
Clan: Member
Experience: 719
Status: Offline
| bluelytning :O Added (2012 September 25, 2:28:24) --------------------------------------------- btw mana ada MH_DrawHudSprite ==' yg ada cuma MH_DrawImage
posted via Blackberry
My FB ._.v
|
|
| |
Grade: Commander DavidJr | Date: Tuesday, 25 September 12, 11:19 PM | Message # 5 |
Commander
Clan: Executive
Experience: 2256
Status: Offline
| LOL
posted via BlackBerry
Personal Site | CSF Website
|
|
| |
Grade: Commander Forcas | Date: Wednesday, 26 September 12, 11:22 AM | Message # 6 |
Title: "CSF Junior Admin"
Clan: Member
Experience: 133
Status: Offline
| Quote (Blue) How to make hud sprite show on the screen like this? sorry im a newbie start learning the script please teach me or how to make procedure or sample! thanks
Use get_user_msgid("StatusIcon")Added (2012 September 26, 10:22:07) --------------------------------------------- Try this :
Code /* Plugin generated by AMXX-Studio */
/* Write this script below in hud.txt :
// showsprite showsprite 640 showsprite 0 0 0 0
*/
#include <amxmodx> #include <amxmisc>
#define PLUGIN "Show Sprite Hud" #define VERSION "1.0" #define AUTHOR "Chocolatos aka. Forcas Cocoa"
new iconstatus;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) iconstatus = get_user_msgid("StatusIcon"); }
public show_spr(id) { new spr_name[33];
spr_name = "showsprite";
message_begin(MSG_ONE,iconstatus,{0,0,0},id); write_byte(1); // status (0=hide, 1=show, 2=flash) write_string(spr_name); // sprite name message_end(); }
You can find my creations in : Forcas Cocoa Rhende's Updates
Visit my blog for more my creations :
Jika plugin saya ada yang error atau tidak aktif saat gameplay, posting pertanyaan dan keluhan kamu disini : Questions ________________________ Saat para modder senior mulai bosan modding, mereka para modder pendatang baru datang dengan karya-karya inovatifnya. Dan para modder senior pun termotivasi untuk terus berkarya..
-Agan Chocolatos-
|
|
| |
Grade: Brigadir Khairul169 | Date: Wednesday, 26 September 12, 7:46 PM | Message # 7 |
Brigadir
Clan: Member
Experience: 719
Status: Offline
| Forcas, cara nentuin posisinya gimana? :O
posted via Blackberry
My FB ._.v
|
|
| |
Grade: Commander Forcas | Date: Wednesday, 26 September 12, 8:49 PM | Message # 8 |
Title: "CSF Junior Admin"
Clan: Member
Experience: 133
Status: Offline
| Quote (1st-Jaguard) Forcas, cara nentuin posisinya gimana? :O
di hud.txt,, agak ribet,, cuma bisa vertikal/atas ke bwah/bwh ke atas g bsa horizontal, cz StatusIcon i2 utk sprite yg di pinggir kiri i2,, klo pngen dtruh kanan y spritex hrus lebar sampe knan
You can find my creations in : Forcas Cocoa Rhende's Updates
Visit my blog for more my creations :
Jika plugin saya ada yang error atau tidak aktif saat gameplay, posting pertanyaan dan keluhan kamu disini : Questions ________________________ Saat para modder senior mulai bosan modding, mereka para modder pendatang baru datang dengan karya-karya inovatifnya. Dan para modder senior pun termotivasi untuk terus berkarya..
-Agan Chocolatos-
|
|
| |
Grade: Trainee Blue | Date: Thursday, 27 September 12, 12:15 PM | Message # 9 |
Trainee
Clan: Member
Experience: 5
Status: Offline
| thanks Grade: Master Forcas i compile it & i add to plugins but i have a noob question the image not showing i made the sprite image showsprite.spr & add the in hud.txt & change the value like this how about location & size i dont see the image? please help
Code showsprite 640 showsprite 0 0 80 32
Message edited by Blue - Thursday, 27 September 12, 12:16 PM |
|
| |
Grade: Commander Forcas | Date: Thursday, 27 September 12, 2:44 PM | Message # 10 |
Title: "CSF Junior Admin"
Clan: Member
Experience: 133
Status: Offline
| Quote (Blue) thanks Grade: Master Forcas i compile it & i add to plugins but i have a noob question the image not showing i made the sprite image showsprite.spr & add the in hud.txt & change the value like this how about location & size i dont see the image? please help
Sorry wrong script,, try this :
Code /* Plugin generated by AMXX-Studio */
/* Write this script below in hud.txt :
// showsprite showsprite 640 showsprite 0 0 0 0
*/
#include <amxmodx> #include <amxmisc>
#define PLUGIN "Show Sprite Hud" #define VERSION "1.0" #define AUTHOR "Chocolatos aka. Forcas Cocoa"
new iconstatus;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("ResetHUD", "onPlayerSpawn", "b"); iconstatus = get_user_msgid("StatusIcon"); }
public show_spr(id) { new spr_name[33];
spr_name = "showsprite";
message_begin(MSG_ONE,iconstatus,{0,0,0},id); write_byte(1); // status (0=hide, 1=show, 2=flash) write_string(spr_name); // sprite name message_end(); }
public onPlayerSpawn(id) { if(is_user_bot(id)) return PLUGIN_CONTINUE;
show_spr(id);
return PLUGIN_HANDLED; }
You can find my creations in : Forcas Cocoa Rhende's Updates
Visit my blog for more my creations :
Jika plugin saya ada yang error atau tidak aktif saat gameplay, posting pertanyaan dan keluhan kamu disini : Questions ________________________ Saat para modder senior mulai bosan modding, mereka para modder pendatang baru datang dengan karya-karya inovatifnya. Dan para modder senior pun termotivasi untuk terus berkarya..
-Agan Chocolatos-
|
|
| |