strcmp playername?
#1

hey..

ive seen some functions with playernames..

wheres that function? i cant find it?

something like

if(!strlem,"playernamehere" something something
Reply
#2

You need to create a player name variable and then you can use it to compare. For example:
pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));

//Then you can do this:

if(!strcmp(pName, "John_Doe", false))
{
     return 1;
}
// or whatever you want.
Hope this helps.
Reply
#3

Quote:
Originally Posted by randomkid88
Посмотреть сообщение
You need to create a player name variable and then you can use it to compare. For example:
pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));

//Then you can do this:

if(!strcmp(pName, "John_Doe", false))
{
     return 1;
}
// or whatever you want.
Hope this helps.
thanks!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)