strcmp(name,"")
#1

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

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

There's even a tutorial for using it.
Reply
#3

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

Код:
  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
  }
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)