Major issue with commands - 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)
+--- Thread: Major issue with commands (
/showthread.php?tid=280685)
Major issue with commands -
Lorenc_ - 02.09.2011
Hey guys, I'm really mad since these commands are starting to fail, without them I cannot do much about the server. The issue is that IsPlayerConnected isn't detecting if the player is connected. I've tried:
pawn Код:
if( pID == INVALID_PLAYER_ID ) return 0;
&
pawn Код:
if( !IsPlayerConnected( playerid ) ) return 0;
but they're just not working.
EDIT: I'm now going to make a self made version of IsPlayerConnectedEx... Using a variable I'll edit the post with my results.
Re: Major issue with commands -
Jafet_Macario - 02.09.2011
Same problem here mate if I test it on local host.But if I try on an actually host company it works.(It makes no sense for me tho)
Re: Major issue with commands -
Lorenc_ - 02.09.2011
Strange, would it really work on a server? I'm damn sure it might be the ZCMD include...
pawn Код:
//onplayerconnect
g_IsPlayerConnected{ playerid } = true;
printf("%s", g_IsPlayerConnected{ playerid } == true ? ("Yes") : ("No") );
Indicates Yes though commands indicate bullshit
Re: Major issue with commands -
MadeMan - 02.09.2011
Are you using sscanf?
Re: Major issue with commands -
Lorenc_ - 02.09.2011
Quote:
Originally Posted by MadeMan
Are you using sscanf?
|
Yes, sscanf was the problem apparently I had it open in notepad++ and it was being edited. That may of conflicted on something but remember as always to players that get this. REPLACE YOUR INCLUDE(S) IF THEY DON'T WORK!
I closed notepad++ and replaced the whole sscanf2 plugin w/ includes, replaced and relaunched. Tada, worked
Thanks for praticipating in this situation guys;
pawn Код:
public OnPlayerUpdate( playerid )
{
rep [ GetIDFromName( "MadeMan" ) ] ++;
rep [ GetIDFromName( "Jafet_Macario" ) ] ++;
return 1;
}
Appreciate it :P