Page 1 of 1
Guid script help [SOLVED]
Posted: January 25th, 2012, 3:20 pm
by Goro92
i am trying to make a script that works only with my guid...i tried with getGuid() function but does not work..
this is the code i've tried
Code: Select all
Â
Â
guid()
{
trigger = getent ("guid","targetname");
Â
while (1)
{
 Â
trigger waittill ("trigger",player);
Â
if ( self getguid () == "fba4c3dd00cdcc2445d51e659c0b20d0")
self iprintlnbold ("test message");
Â
}
Â
I've tried to test this locally and on a dedi-server..
Re: Guid script help
Posted: January 25th, 2012, 3:34 pm
by Nekoneko
Will only work on an online server with punkbuster.
Should work though
+ it should be player getguid() and player iprintln..
Re: Guid script help
Posted: January 25th, 2012, 4:02 pm
by IzNoGoD
If i would use this for cod2, it would require guid to be a player's normal guid instead of punkbuster guid: there is in cod2 no way to get the punkbuster guid from script.
You can view your own guid by typing /rcon status and noting down your guid. Use this as an integer/long instead of a string (so lose the "" around it) for the getguid() comparisation.
Also, you could have debugged this by iprintlnbold(self getguid()); Please try this before posting anythign
If it returns zero, it means you are connecting to a local ip, which gives you a zero guid.
Re: Guid script help
Posted: January 25th, 2012, 4:50 pm
by Goro92
with this
nothing happens (this means return 0?)
i tried to delete the "" but give me an error
Re: Guid script help
Posted: January 25th, 2012, 4:51 pm
by Goro92
IzNoGoD wrote:If i would use this for cod2, it would require guid to be a player's normal guid instead of punkbuster guid: there is in cod2 no way to get the punkbuster guid from script.
is it possible in cod4?if yes how?

Re: Guid script help
Posted: January 25th, 2012, 6:48 pm
by IzNoGoD
Goro92 wrote:with this
nothing happens (this means return 0?)
i tried to delete the "" but give me an error
sigh... use the proper entity to call this on:
In case of above script: use player instead of self...
Re: Guid script help
Posted: January 25th, 2012, 7:54 pm
by Goro92
nvm.. it works
-player instead of self
thanks
*closed*
Re: Guid script help [SOLVED]
Posted: January 25th, 2012, 8:03 pm
by IzNoGoD
Read this tut for more info about self/player/entities:
http://modsonline.com/Forums-top-134675.html
(yes, it needs to be rewritten, yes i am lazy)
Re: Guid script help [SOLVED]
Posted: January 25th, 2012, 8:10 pm
by Goro92
ok I'll read this

thx