Raised This Month: $ Target: $400
 0% 

Aiming at player show..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 08-28-2007 , 14:02   Aiming at player show..
Reply With Quote #1

How to make that if you aim at player who is in your CT it shows on lower right screen - CP: checkpointnum[i-1]

checkpointnum[i-1] is amxmodx function that needs to show..

that users checkpointnum ..
__________________
Ahujena
mazmaajinsh is offline
Miczu
Member
Join Date: Jul 2007
Old 08-28-2007 , 15:34   Re: Aiming at player show..
Reply With Quote #2

You can use:
native Float:get_user_aiming(id, &target, &body, dist=9999)
It will return target id, then you use:
native get_user_team(id, team[]="", len=0);
to get team id of aimed player, and team id aiming player. If first and second team id are the same then... hmm client_print of hud_message (don't know ).
Miczu is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 08-28-2007 , 16:10   Re: Aiming at player show..
Reply With Quote #3

what...
X-Script is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 08-28-2007 , 16:33   Re: Aiming at player show..
Reply With Quote #4

Grammar please... (can someone clarify the problem)
M249-M4A1 is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 08-28-2007 , 16:38   Re: Aiming at player show..
Reply With Quote #5

Here is a crappy example:
PHP Code:
public function(id)
{
    new 
aimedbodyteam1team2;
    
get_user_aiming(idaimedbody);
    
team1 get_user_team(id);
    
team2 get_user_team(aimed);
    
    if(
team1 == team2)
    {
        
// Both teams are the same, show the message
        
set_hudmessage(025501.0, -1.0);
        
show_hudmessage(id"CP: Number");
    }

hlstriker is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 08-28-2007 , 18:24   Re: Aiming at player show..
Reply With Quote #6

?? could you make the complete script?
__________________
Ahujena
mazmaajinsh is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 08-28-2007 , 20:25   Re: Aiming at player show..
Reply With Quote #7

No because I don't know the rest of your code.
hlstriker is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 08-29-2007 , 06:18   Re: Aiming at player show..
Reply With Quote #8

Ok. here it is - http://www.ampaste.net/82765
__________________
Ahujena
mazmaajinsh is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 09-01-2007 , 16:26   Re: Aiming at player show..
Reply With Quote #9

anyone?
__________________
Ahujena
mazmaajinsh is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-02-2007 , 04:40   Re: Aiming at player show..
Reply With Quote #10

Omg >.> look at this and stop bumping... is just a simple e.g :

Code:
new check_points[33];
//.....
public my_function(id) //maybe client prethink()
{
 new target, body, distance = 999999;
 get_user_aiming(id, target, body, distance);
 
 if(is_user_connected(target))
 {
  check_points[target]; //dunno , sum somewhere....
 
  new ip[32];
  get_user_ip(target, ip, sizeof ip - 1, 1);
 
  new country[32];
  geoip_country(ip, country, sizeof country - 1);
 
  new player_time = get_user_time(target, 1);
 
  new Buffer[256];
  format(Buffer, sizeof Buffer - 1, "CheckPoints: %d | Contry : %s | Time : %d", check_points[target], country, player_time);
 
  message_begin(MSG_ONE, get_user_msgid("StatusText"), _, id);
  write_byte(0);
  write_string(Buffer);
  message_end();
 }
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply


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 16:09.


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