(HELP!) Define Variable For Certain Players (HELP!)

Posts 19 of 9 · Page 1 of 1
(HELP!) Define Variable For Certain Players (HELP!)
Hey guys! I need help defining a variable for a certain player. What i mean is im trying to give my friend that i know lots of money, while everyone else still has their standard amount.

Heres what i do for myself:

Code:
if(self isHost())pTotal = 50000;
That gives me 50000, while this makes everyone else have 100

Code:
self.TotalZombiePoints = pTotal + 100;
What im trying to do, is basically defind a varible if a players name is "this cetain name"

For example, lets say my friend is Bob. (i know this wont work, just an example of what i think it will turn out to be something like:

Code:
self player_bob = friend1
Code:
So then i would go if(self friend1())pTotal = 50000
Anyone know a way i could do this? Thanks!
Code:
if((self.name == "Bob1") 
|| (self.name == "Bob2"))
pTotal = 50000
Something like that or?
Quote Originally Posted by Chijiru View Post
Code:
if((self.name == "Bob1") 
|| (self.name == "Bob2"))
pTotal = 50000
Something like that or?
That didnt work, but i only tried this based of your theory:
Code:
		if(self.name == "Bob"())pTotal = 99999
Quote Originally Posted by Chijiru View Post
Code:
if((self.name == "Bob1") 
|| (self.name == "Bob2"))
pTotal = 50000
Something like that or?
What he said was perfect.. and you put it in a different way...
Code:
if((self.name == "Bob1") 
|| (self.name == "Bob2"))
{
pTotal = 50000
}
Actually not, the way that now works that i found out myself is this:

Code:
if(self isHost() || self.name == "NAME HERE OF PERSON")pTotal = 50000;
Quote Originally Posted by Pete8497 View Post
Actually not, the way that now works that i found out myself is this:

Code:
if(self isHost() || self.name == "NAME HERE OF PERSON")pTotal = 50000;
It could work either way as I said you put it in another form.. It doesn't matter you got what you needed..
I figured it out! THANKS ANYWAYS GUYS!
no double posting. read the rules
Moved to help.
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?