if playername = "" ???
#1

How can I make an if statement to check if a players name matches the string?
Reply
#2

pawn Код:
if(!strcmp(string, playername))
{
    //if matches
}
else
{
    //not matches
}
Reply
#3

Код:
if(!strcmp(string, "NicholasA"))
	{
	    SendClientMessageToAll(0x26F70FFF, "it works");
	}
	else
	{
	    //not matches
	}
Doesnt work
Reply
#4

what did the string contain?
Reply
#5

Then you didn't but the right string in "string"

Here is some strcmp reference:
https://sampwiki.blast.hk/wiki/Strcmp
Reply
#6

It works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)