Testing for player plugin on player connect - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Testing for player plugin on player connect (
/showthread.php?tid=250422)
Testing for player plugin on player connect -
HondaCBR - 23.04.2011
how can i test for audio plugin
lets say someone comes who has it he will get message: Audio plugin loaded
and some one without plugin will get message: please download plugin from bla bla bla
one more thing, is it possible to do a cmd lets say /plugin and it will direct it to a download link? what i mean is if it could open browser link or something? or open the plugin setup file from plugins folder on my server?
Re: Testing for player plugin on player connect -
Raimis_R - 23.04.2011
You can detect:
example:
pawn Code:
new bool:PlayerConnectedToPlugin[ MAX_PLAYERS ];
pawn Code:
public Audio_OnClientConnect( playerid )
{
PlayerConnectedToPlugin[ playerid ] = true;
}
OnClientConnect called when player spawning so you can check if variable it's true in OnPlayerSpawn
But you can't open browser.
Re: Testing for player plugin on player connect -
HondaCBR - 23.04.2011
and where would i add the text message? one sayin download plugin, and other plugin loaded
Re: Testing for player plugin on player connect -
Raimis_R - 23.04.2011
So you can checks
pawn Code:
if( !IsPlayerConnectedToPlugin[ playerid ] ) // If Player Not Connected
{
SendClientMessage( playerid,-1,"You need download the stuff at http// etc..com" );
}
else
{
SendClientMessage( playerid,-1,"Plugin download'ed now you can play " );
}
Re: Testing for player plugin on player connect -
HondaCBR - 23.04.2011
error 017: undefined symbol "IsPlayerConnectedToPlugin"
Re: Testing for player plugin on player connect -
Raimis_R - 23.04.2011
Uch sorry.
pawn Code:
if( !PlayerConnectedToPlugin[ playerid ] )
Re: Testing for player plugin on player connect -
HondaCBR - 23.04.2011
the code works, but in game it doesnt matter if you have plugin or not you will get that first message to download plugin :/
Re: Testing for player plugin on player connect -
Raimis_R - 23.04.2011
Okey meybe try to set timer when player spawning and chekc if player have plugin.
I really don't know but set about ~3sec interval