Raised This Month: $ Target: $400
 0% 

Returning Server's name instead of Player name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 08-14-2012 , 10:02   Returning Server's name instead of Player name
Reply With Quote #1

Hey Guys, I am back after few months, I was working in PHP. I forgot allot of things in SMALL. Here I am trying to get the name of the player who has died. But There is some problem in it. In game, When I kill somebody or get killed I should get the message "somebody has been shot to death!", But in game I am getting "My-Server has been shot to death".
I dont know how to get the name properly. It is returning the server name.

Code:
#include <amxmodx> #include <amxmisc> public  plugin_init() {     register_plugin("Gameplay1","1.0","Waleed");     register_event("DeathMsg", "hook_death", "a", "1>0") } public  hook_death(id) {     new name[32]     get_user_name(id, name, charsmax(name))     client_print(id, print_chat, " %s has been shot to death!", name) }

I have new ideas but stuck at the starting xD
Sorry for asking such a newbie question
Thnx
__________________
Working On:
  1. Gameplay 1 - 0% [PAUSED]

Last edited by Waleed; 08-14-2012 at 10:03.
Waleed is offline
Send a message via Skype™ to Waleed
 


Thread Tools
Display Modes

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 05:48.


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