Testing for player plugin on player connect
#1

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?
Reply
#2

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.
Reply
#3

and where would i add the text message? one sayin download plugin, and other plugin loaded
Reply
#4

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 " );
}
Reply
#5

error 017: undefined symbol "IsPlayerConnectedToPlugin"
Reply
#6

Uch sorry.

pawn Code:
if( !PlayerConnectedToPlugin[ playerid ] )
Reply
#7

the code works, but in game it doesnt matter if you have plugin or not you will get that first message to download plugin :/
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)