GetPlayerName
#1

Hi GuyZ,

I made this (dont know if this is right):

pawn Код:
new name[MAX_PLAYER_NAME];
    if GetPlayerName(playerid, name, sizeof(name)) *then
    if (name == "//The name, wont show it here")
    {
      SendClientMessage(playerid,COLOR_RED,"//Text that will be shown i didnt wanted to show it here");
      return 1;
    }
But then i get this error:

Код:
(2424) : error 033: array must be indexed (variable "name")
Can someone help me?
Reply
#2

use: !strcmp(name, "something", true)
Reply
#3

As I said, he has to use STRCMP.

pawn Код:
if(!strcmp(name, "name here", true))
{
//code
}
Reply
#4

Thanks for the help guys!
Reply
#5

No problem for me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)