What is this error.
#8

Quote:
Originally Posted by denNorske
Посмотреть сообщение
params is a string (You can determine that by the two square brackets after the parameter, "params[]")
So how you use it, you expect it to work as an integer (index in the array). To do that, you need to convert the string to an integer.

Try using strval(params) instead of params only at the last variable. This makes it be an integer.

Remember that strval() returns 0 for text as well.
https://sampwiki.blast.hk/wiki/Strval

PHP код:
  if(!isnull(params)) BannedFromServer[strval(params)] = true
And if you want to save his ban, you need to save it to a file/database and read from it in order to check if he is banned.

Your current method won't hold up.
I'm trying to that that and I've adding this code to OnPlayerConnect but it always showen to me when joined the server and I banned "You are banned from this server" Why?

PHP код:
public OnPlayerConnect(playerid)
{
    if(
BannedFromServer[playerid])
    {
        
SendClientMessage(playerid, -1" You are banned ! ");
        return 
Kick(playerid);
    } 
Quote:
Originally Posted by AndreProgrammer
Посмотреть сообщение
What is the saved system of your server ?
Exause me?
Reply


Messages In This Thread
What is this error. - by Man43 - 31.07.2018, 14:20
Re: What is this error. - by denNorske - 31.07.2018, 14:27
Re: What is this error. - by AndreProgrammer - 31.07.2018, 14:28
Re: What is this error. - by Man43 - 31.07.2018, 14:29
Re: What is this error. - by AndreProgrammer - 31.07.2018, 14:31
Re: What is this error. - by Man43 - 31.07.2018, 14:33
Re: What is this error. - by AndreProgrammer - 31.07.2018, 14:35
Re: What is this error. - by Man43 - 31.07.2018, 14:43
Re: What is this error. - by AndreProgrammer - 31.07.2018, 14:46
Re: What is this error. - by Man43 - 31.07.2018, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)