Posts: 175
Threads: 9
Joined: Aug 2010
I'm getting this error: 123.pwn(102) : error 033: array must be indexed (variable "-unknown-")
Код:
new pname[MAX_PLAYER_NAME];
if (GetPlayerName(playerid, pname, sizeof(pname)) == "playersname")
{
do something..
}
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Ironboy
You mean this?
pawn Код:
new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s ", pname); //do something here SendClientMessageToAll(COLOR_YELLOW, string);
|
No, I wanna check the players name and then if its X player, it will do X thing.
Posts: 70
Threads: 20
Joined: Aug 2011
Reputation:
0
Try to express more what. U try to say, i can help you. But i dont understand what r u trying to do
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by diego_p11
Try to express more what. U try to say, i can help you. But i dont understand what r u trying to do
|
I'm trying to make someone receive X level if that someone has Y name.
if ( playername == "samp")
{
give him level...
}
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Schurman
pawn Код:
if(strcmp(playername, "samp") == 0) { //code here }
|
Thank you!