PDA

View Full Version : Major issue with commands


Lorenc_
02/09/2011, 03:20 PM
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:


if( pID == INVALID_PLAYER_ID ) return 0;


&


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.

Jafet_Macario
02/09/2011, 03:23 PM
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)

Lorenc_
02/09/2011, 03:30 PM
Strange, would it really work on a server? I'm damn sure it might be the ZCMD include...


//onplayerconnect
g_IsPlayerConnected{ playerid } = true;
printf("%s", g_IsPlayerConnected{ playerid } == true ? ("Yes") : ("No") );


Indicates Yes though commands indicate bullshit

MadeMan
02/09/2011, 03:39 PM
Are you using sscanf?

Lorenc_
02/09/2011, 03:44 PM
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;


public OnPlayerUpdate( playerid )
{
rep [ GetIDFromName( "MadeMan" ) ] ++;
rep [ GetIDFromName( "Jafet_Macario" ) ] ++;
return 1;
}

Appreciate it :P