Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   playerleaves (https://forums.graalonline.com/forums/showthread.php?t=24661)

nyghtGT 02-27-2002 04:42 AM

playerleaves
 
NPC Code:

NPC Code:

if (playerleaves) {
setstring server.string,#v(ringstatus);
}




That works so if all the players leave the level it sets the variable to a server string right ?

Its for a free server ...

Goboom 02-27-2002 06:44 AM

is playerleaves a commmand...??? ....If not if its for a specific level... you could use this i think
NPC Code:

if (!strequals(#L,<levelname>)){
setstring server.string,#v(ringstatus);
}


Faheria_GP2 02-27-2002 06:47 AM

Re: playerleaves
 
Quote:

Originally posted by nyghtGT
NPC Code:

NPC Code:

if (playerleaves) {
setstring server.string,#v(ringstatus);
}




That works so if all the players leave the level it sets the variable to a server string right ?

Its for a free server ...

playerleaves is a P2P event, use

if (playerenters && !strequals(#L,blah.graal))

nyghtGT 02-27-2002 06:56 AM

no its not for if the player leaves the level its not a player based NPC... Its all level based, I think it means if all players leave the level then the action occurs, cause whenever i tried it online and i left with other people in it nothing happened ....

Faheria_GP2 02-27-2002 07:20 AM

yes, it is for if the player leaves the level

nothing happened online because playerleaves doesn't work for Non-P2P

and NPCs don't even run while there are no players in the level for non-p2p (the npcs are run by the "leader", with no players, no leader)

although on P2P you could do "playerscount=0" or something

nyghtGT 02-27-2002 07:26 AM

Quote:

Originally posted by Faheria_GP2
yes, it is for if the player leaves the level

nothing happened online because playerleaves doesn't work for Non-P2P

and NPCs don't even run while there are no players in the level for non-p2p (the npcs are run by the "leader", with no players, no leader)

although on P2P you could do "playerscount=0" or something

ok what i am saying is i want it to be used as if there is a painting in the level that people can doodle on, and say everyone leave the level, well all the vlaues would be reet and the painting lost, what i want it to be able to do is for when the last player leaves it sets the values to a serevr.string and then the normal vars are reset ...

Faheria_GP2 02-27-2002 07:28 AM

well, the only thing you could do for non-P2P is when the first player enters the level do those things

"if (playerenters && isleader)"

nyghtGT 02-27-2002 07:59 AM

Quote:

Originally posted by Faheria_GP2
well, the only thing you could do for non-P2P is when the first player enters the level do those things

"if (playerenters && isleader)"

you just do not understand ....

If players A,B,C,D,E, and F are all in level.nw, and then they all leave. I want it to 'setstring server.string,#v(this.variable);' I want to know if 'playerleaves' will make it so it will set the string when they all leave ...

TDK_RC6 02-27-2002 09:22 AM

playerleaves is p2p only

here is a script that will work

NPC Code:

if (playerenters||timeout)
setstring server.string,#v(playerscount);
timeout=.05;
}


nyghtGT 02-27-2002 10:15 AM

"Royce": Nyght you could have atleast of asked me. Player leaves in a p2p command. The only way to save the picture before the players leave is to run a constant timeout. Screen name, shouldnt you have a timeeverywhere command in there also?


All times are GMT +2. The time now is 04:38 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.