SA-MP Forums Archive
strcmp(name,"") - 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: strcmp(name,"") (/showthread.php?tid=144399)



strcmp(name,"") - Steven82 - 27.04.2010

How do i use this command for people with only a certain name for some reason i tried it and it didn't work.


Re: strcmp(name,"") - Calgon - 27.04.2010

https://sampwiki.blast.hk/wiki/Strcmp

There's even a tutorial for using it.


Re: strcmp(name,"") - Steven82 - 27.04.2010

Quote:
Originally Posted by Freddo [BINMAN
]
https://sampwiki.blast.hk/wiki/Strcmp

There's even a tutorial for using it.
No like the function

pawn Код:
Strcmp(name,"Steven82")
{
{
//something here
}
else
{
//something else here
}
}
this nerver seems to work it lets everyone in.


Re: strcmp(name,"") - Whitetiger - 27.04.2010

Код:
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  if(!strcmp(name, "Steven82", true)) {
    //Stuff to do if steven82 is matched.
  }
  else
  {
    //random other code
  }



Re: strcmp(name,"") - Calgon - 27.04.2010

Quote:
Originally Posted by Steven82
Quote:
Originally Posted by Freddo [BINMAN
]
https://sampwiki.blast.hk/wiki/Strcmp

There's even a tutorial for using it.
No like the function

pawn Код:
Strcmp(name,"Steven82")
{
{
//something here
}
else
{
//something else here
}
}
this nerver seems to work it lets everyone in.
It's a function that has to be used within an if statement, please actually check the wiki as it seems you know hardly anything.