Need help - strcmp at OnPlayerConnect - 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: Need help - strcmp at OnPlayerConnect (
/showthread.php?tid=105932)
Need help - strcmp at OnPlayerConnect -
Striker_Moe - 31.10.2009
Okay, Iґve got several strcmps at OnPlayerConnect. Just like this:
Код:
if(strcmp(PlayerName, "Name", true))
{
gangmember[playerid] = 1;
gangleader[playerid] = 1;
}
But somehow everyone joining gets the value assigned! Why?
Re: Need help - strcmp at OnPlayerConnect -
Abernethy - 31.10.2009
Can you please post all your OnPlayerConnect code.
Re: Need help - strcmp at OnPlayerConnect -
member - 31.10.2009
Doesn't
strcmp mean the comparisons do not match
Try changing:
pawn Код:
if(strcmp(PlayerName, "Name", true)) // Name is not found/matched
to:
pawn Код:
if(!strcmp(PlayerName, "Name", true)) // name is found/matched
Re: Need help - strcmp at OnPlayerConnect -
Striker_Moe - 31.10.2009
*facepalm
Of course.. thank you.