OnPlayerConnect
#4

Quote:
Originally Posted by Socan
Посмотреть сообщение
You mean this?

Код:
	if(fexist(file)) {
	    ShowLogin(playerid);
	}else {
	    ShowRegister(playerid);
		new params;
		if(strcmp(params, "test", true) == 0 );
		{
			Kick(playerid);

		}
	}
There is your issue. You're never fetching the players name. You're comparing "test" which is an array:

pawn Код:
array[0] = 't';
array[1] = 'e';
array[2] = 's';
array[3] = 't';
to a number: params ( aka a single value - not an array or string for that matter )


What you should have done is fetch the name using https://sampwiki.blast.hk/wiki/GetPlayerName

Then what you do is compare the name(which in turn is a string - or an array for pawn's scenario) with the strcmp function.
Reply


Messages In This Thread
OnPlayerConnect - by Socan - 01.10.2012, 08:37
Re: OnPlayerConnect - by Extremo - 01.10.2012, 08:40
Re: OnPlayerConnect - by Socan - 01.10.2012, 08:43
Re: OnPlayerConnect - by Extremo - 01.10.2012, 08:46
Re: OnPlayerConnect - by Socan - 01.10.2012, 08:48
Re: OnPlayerConnect - by Extremo - 01.10.2012, 08:51
Re: OnPlayerConnect - by Socan - 01.10.2012, 09:03
Re: OnPlayerConnect - by Socan - 01.10.2012, 10:16
Re: OnPlayerConnect - by Extremo - 01.10.2012, 10:27
Re: OnPlayerConnect - by mamorunl - 01.10.2012, 12:35

Forum Jump:


Users browsing this thread: 1 Guest(s)