Dark_Angel
Member
- Joined
- Sep 5, 2014
- Messages
- 8
- Reaction score
- 0
Re: [AHK] samp udfEx
Push
Push
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))
}
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))
}
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
nope, because it seems like nobody cares, so.. ^^Dark_Angel link said:Are you still working on this?
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
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
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
}
0B34: samp register_client_command "command1" to_label @command1
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