Guid script help [SOLVED]

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

Guid script help [SOLVED]

Post by Goro92 » January 25th, 2012, 3:20 pm

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..
Last edited by Goro92 on January 25th, 2012, 7:54 pm, edited 1 time in total.
Image

Nekoneko
CJ Fan
CJ Fan
Posts: 170
Joined: April 18th, 2011, 3:48 pm

Re: Guid script help

Post by Nekoneko » January 25th, 2012, 3:34 pm

Will only work on an online server with punkbuster.
Should work though

+ it should be player getguid() and player iprintln..

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Guid script help

Post by IzNoGoD » January 25th, 2012, 4:02 pm

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.
LMGTFY!

Its not a glitch... Its the future!

User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

Re: Guid script help

Post by Goro92 » January 25th, 2012, 4:50 pm

with this

Code: Select all

iprintlnbold(self getguid())
nothing happens (this means return 0?)

i tried to delete the "" but give me an error
Image

User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

Re: Guid script help

Post by Goro92 » January 25th, 2012, 4:51 pm

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? :)
Image

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Guid script help

Post by IzNoGoD » January 25th, 2012, 6:48 pm

Goro92 wrote:with this

Code: Select all

iprintlnbold(self getguid())
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...
LMGTFY!

Its not a glitch... Its the future!

User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

Re: Guid script help

Post by Goro92 » January 25th, 2012, 7:54 pm

nvm.. it works

-player instead of self

thanks

*closed*
Image

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Guid script help [SOLVED]

Post by IzNoGoD » January 25th, 2012, 8:03 pm

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)
LMGTFY!

Its not a glitch... Its the future!

User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

Re: Guid script help [SOLVED]

Post by Goro92 » January 25th, 2012, 8:10 pm

ok I'll read this :) thx
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests