AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Aiming at player show.. (https://forums.alliedmods.net/showthread.php?t=60176)

mazmaajinsh 08-28-2007 14:02

Aiming at player show..
 
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 ..

Miczu 08-28-2007 15:34

Re: Aiming at player show..
 
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 :oops:).

X-Script 08-28-2007 16:10

Re: Aiming at player show..
 
what...

M249-M4A1 08-28-2007 16:33

Re: Aiming at player show..
 
Grammar please... (can someone clarify the problem)

hlstriker 08-28-2007 16:38

Re: Aiming at player show..
 
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");
    }



mazmaajinsh 08-28-2007 18:24

Re: Aiming at player show..
 
?? could you make the complete script?

hlstriker 08-28-2007 20:25

Re: Aiming at player show..
 
No because I don't know the rest of your code.

mazmaajinsh 08-29-2007 06:18

Re: Aiming at player show..
 
Ok. here it is - http://www.ampaste.net/82765

mazmaajinsh 09-01-2007 16:26

Re: Aiming at player show..
 
anyone?

Alka 09-02-2007 04:40

Re: Aiming at player show..
 
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();
 }
}



All times are GMT -4. The time now is 16:09.

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