AHK SAMP UdfEx (0.3.7)

Luis54321

New member
Joined
May 28, 2014
Messages
3
Reaction score
0
Re: [AHK] samp udfEx

Code:
Numpad3::
callFuncForAllStreamedInPlayers("foo", 300)
return
; cfunc prototype: somefunc(o);     o = Object("NAME", "ID", "PING", "SCORE", "ISNPC", "PED", "POS", "HP", "ARMOR")
; this function is then called for each player
foo(o)
{
	if(!o)
		return
	Position := o.POS[1],o.POS[2],o.POS[3]
	Ppos := getCoordinates()
	PlayerPosition := Ppos[1],Ppos[2],Ppos[3]
	Distanz := getDist(PlayerPosition,Position)		
	addMessageToChatWindow("{FFFFFF}" o.NAME "(" o.ID ") Distance:(" Distanz ") HP: {FF0000}" Round(o.HP))
}
Why it doesnt work?
I can´t see the Distance
 

democrazy

Active member
Joined
Aug 4, 2014
Messages
65
Reaction score
0
Re: [AHK] samp udfEx

[member=19309]Peter1337[/member]
Code:
Numpad3::
callFuncForAllStreamedInPlayers("foo", 300)
return


foo(o)
{
	if(!o)
		return
	Position := o.POS
	PlayerPosition := getCoordinates()
	Distanz := getDist(PlayerPosition,Position)
	addMessageToChatWindow("{FFFFFF}" o.NAME "(" o.ID ") Distance:({0000ff}" Round(Distanz) "{ffffff}) HP: {FF0000}" Round(o.HP))
}
 

Luis54321

New member
Joined
May 28, 2014
Messages
3
Reaction score
0
Re: [AHK] samp udfEx

I need a Second Time your help
Code:
SetParam("use_window", "1")
SetParam("window", "GTA:SA:MP")

Settimer, Nameoverlay, 250

Nameoverlay := -1

foo(o)
{
	if(!o)
		return
	Position := o.POS
	PlayerPosition := getCoordinates()
	Distanz := getDist(PlayerPosition,Position)
	TextSetString(NameOverlay,"`n{FFFFFF}" o.NAME "(" o.ID ") Distance:({0000ff}" Round(Distanz) "{ffffff}) HP: {FF0000}" Round(o.HP) "")
}


Nameoverlay:
    if(Nameoverlay == -1)
    {
        Nameoverlay := TextCreate("Arial", 5,  true, false, 628, 188, 0xFFFFFFFF, "", false, true)
    }
		callFuncForAllStreamedInPlayers("foo", 300)
return
How can i create a new line for every Player?
[member=24017]democrazy[/member]
 

test123456789

New member
Joined
Nov 4, 2014
Messages
1
Reaction score
0
Re: [AHK] samp udfEx

I need help at my function. I would like read the Player Health by the Ped. I hope you can help :)
 

fusro

Member
Joined
Sep 21, 2014
Messages
20
Reaction score
0
Re: [AHK] samp udfEx

I get this

Q5Icev1.png


Cjv7O61.png
 

PeterL

Member
Joined
Dec 26, 2014
Messages
16
Reaction score
0
Re: [AHK] samp udfEx

[member=24017]democrazy[/member] can you help me with this Overlay?
Code:
SetParam("use_window", "1")
SetParam("window", "GTA:SA:MP")

Settimer, Nameoverlay, 250

Nameoverlay := -1

foo(o)
{
 if(!o)
  return
 Position := o.POS
 PlayerPosition := getCoordinates()
 Distanz := getDist(PlayerPosition,Position)
 TextSetString(NameOverlay,"`n{FFFFFF}" o.NAME "(" o.ID ") Distance:({0000ff}" Round(Distanz) "{ffffff}) HP: {FF0000}" Round(o.HP) "")
}


Nameoverlay:
    if(Nameoverlay == -1)
    {
        Nameoverlay := TextCreate("Arial", 5,  true, false, 628, 188, 0xFFFFFFFF, "", false, true)
    }
  callFuncForAllStreamedInPlayers("foo", 300)
return
It should look like this http://abload.de/img/sa-mp-85123f4k.png
 

hollow36rus

Member
Joined
Jul 20, 2013
Messages
6
Reaction score
0
Re: [AHK] samp udfEx

Is it possible to somehow determine visibility of nickname?
Server have a function of "masks" that should hide the name, but this script still sees name.

Sry for my eng :c
 

Attachments

  • Без-имени-1.jpg
    Без-имени-1.jpg
    107 KB · Views: 326

hollow36rus

Member
Joined
Jul 20, 2013
Messages
6
Reaction score
0
Re: [AHK] samp udfEx

hollow36rus link said:
Is it possible to somehow determine visibility of nickname?
Server have a function of "masks" that should hide the name, but this script still sees name.

Sry for my eng :c

Problem solved. One more question...
How to gain and display(ChatMessage) the values of о.HP and o.ARMOR the player on whom i aimed?
 

democrazy

Active member
Joined
Aug 4, 2014
Messages
65
Reaction score
0
Re: [AHK] samp udfEx

you can get the "ped" of a player when aiming with: getTargetPed()
then you can use: getStreamedInPlayersInfo()
something like this:
Code:
getTargetHp() {
    p := getStreamedInPlayersInfo()
    if(!p)
        return -1
    ped:=getTargetPed()
    For i, o in p
    {
        if(ped==o.PED)
            return o.HP    ;use "o.ARMOR" to get armor..
    }
    return -1
}
 

hollow36rus

Member
Joined
Jul 20, 2013
Messages
6
Reaction score
0
Re: [AHK] samp udfEx

Thank you so much!

Is it possible to somehow using 'sampUDFEx' to create a client command as it used in Cleo SampFunc?

Code:
0B34: samp register_client_command "command1" to_label @command1
 

|]_ReT1neX_[|

Active member
Joined
Jul 28, 2014
Messages
132
Reaction score
0
Re: [AHK] samp udfEx

hollow36rus link said:
Thank you so much!

Is it possible to somehow using 'sampUDFEx' to create a client command as it used in Cleo SampFunc?

Code:
0B34: samp register_client_command "command1" to_label @command1

Use SAMPFUNCS API

Click Me
 

hollow36rus

Member
Joined
Jul 20, 2013
Messages
6
Reaction score
0
Re: [AHK] samp udfEx

Another question. Is it possible to draw a text in XYZ screen coords? Previously, it was like TextCreate() and Overlay. How to do it now?
 

PeterL

Member
Joined
Dec 26, 2014
Messages
16
Reaction score
0
Re: [AHK] samp udfEx

Can i send a Shot with ahk? it doesn´t  work
Code:
~RButton::
	Target:=getTargetPed()
	if(Target)
	
	id:=getIdByPed(Target)
	if(id>-1)
	{
	Sendinput, {Numpad8}
	}
	return
Can someone help me?
 
Top