Posts: 46
Threads: 10
Joined: Jan 2011
Reputation:
3
So im still a newb at modding and im trying to enable VIP features based on someones XUID. This is what iv'e tried so far:
Code: VIP()
{
if(self getxuid("1100001747b082d"));
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
}
The problem is that everyone gets max ammo. Help would be appreciated.
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
04-29-2011, 19:43
(This post was last modified: 04-29-2011, 19:50 by iAegle.)
Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
edit:
something easier if you want to use multiple vips
Code: addVip( xuid )
{
foreach( player in level.players)
{
if(player.guid == xuid )
{
player giveMaxAmmo("coltanaconda_mp");
}
}
}
then use
Code: level addVip( xuid );
to add a vip
Posts: 46
Threads: 10
Joined: Jan 2011
Reputation:
3
(04-29-2011, 19:43)iAegle Wrote: Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
didn't work, now i don't get ammo at all
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
(04-29-2011, 19:49)isokasi Wrote: (04-29-2011, 19:43)iAegle Wrote: Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
didn't work, now i don't get ammo at all
isnt
Code: self giveMaxAmmo("coltanaconda_mp", 0, false);
supposed to be:
Code: self giveMaxAmmo("coltanaconda_mp");
Posts: 46
Threads: 10
Joined: Jan 2011
Reputation:
3
04-29-2011, 19:52
(This post was last modified: 04-29-2011, 20:00 by isokasi.)
(04-29-2011, 19:50)iAegle Wrote: (04-29-2011, 19:49)isokasi Wrote: (04-29-2011, 19:43)iAegle Wrote: Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
didn't work, now i don't get ammo at all
isnt
Code: self giveMaxAmmo("coltanaconda_mp", 0, false);
supposed to be:
Code: self giveMaxAmmo("coltanaconda_mp");
yea it is, i tried changing it but it still wont work
(04-29-2011, 19:52)isokasi Wrote: (04-29-2011, 19:50)iAegle Wrote: (04-29-2011, 19:49)isokasi Wrote: (04-29-2011, 19:43)iAegle Wrote: Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp", 0, false);
}
didn't work, now i don't get ammo at all
isnt
Code: self giveMaxAmmo("coltanaconda_mp", 0, false);
supposed to be:
Code: self giveMaxAmmo("coltanaconda_mp");
yea it is, i tried changing it but it still wont work
i got this to work, but for some reason it doesnt work with the xuid
Code: if(self.name == "MYNAME")
{
self giveMaxAmmo("coltanaconda_mp");
}
Posts: 619
Threads: 30
Joined: Oct 2010
Reputation:
85
Code: if(self.guid == "xuid")
{
self giveMaxAmmo("coltanaconda_mp");
}
did you change the "xuid?"
otherwise you might want the code like this:
Code: if(self.guid == "1100001747b082d")
{
self giveMaxAmmo("coltanaconda_mp");
}
or do what like iAegle and I did:
Code: onPlayerSpawned()
{
etc...
self CheckVip();
}
CheckVip()
{
if(self.guid == "xuidgoeshere" || self.guid == "xuidgoeshere" || self.guid == "xuidgoeshere" || and add more..)
self giveMaxAmmo("coltanaconda_mp");
}
Posts: 46
Threads: 10
Joined: Jan 2011
Reputation:
3
04-29-2011, 20:16
(This post was last modified: 04-29-2011, 20:21 by isokasi.)
Still not working, heres the mod http://pastebin.com/4wLT3miY
EDIT: NVM it works now. When i started the game it said LPXUID 1100001747b082d, but when i typed "status" in the console it said 01100001747b082d (a zero infront of the XUID). But thanks for everyone that was helping <3
Posts: 623
Threads: 57
Joined: Jan 2011
Reputation:
14
if you use name as VIP do you have to add the colour tags or not? example: ^2E^1P^7I^8C or something
Posts: 19
Threads: 1
Joined: Dec 2010
Reputation:
1
Can you please explain me how to use it?
Posts: 14
Threads: 3
Joined: Jun 2012
Reputation:
0
it show me an error at
Quote:if(self.guid == "11000010471f66e")
but i dont know why, pls help me
|