#1

Код:
    if(gPlayerLogTries[playerid] == 3) { Kick(playerid);
    	{
        format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.", name, reason);
     	SendClientMessageToAll(0xFF9900AA, string);
i have this but i get errors
Код:
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(120) : warning 217: loose indentation
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(121) : error 017: undefined symbol "string"
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(121) : error 017: undefined symbol "string"
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(121) : error 029: invalid expression, assumed zero
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(121) : fatal error 107: too many error messages on one line
Reply
#2

pawn Код:
if(gPlayerLogTries[playerid] == 3)
{
Kick(playerid);
        format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.", name, reason);
        SendClientMessageToAll(0xFF9900AA, string);
}
But you won't receive the message. Use a timer to receive it.
Reply
#3

Ok i already did that but read the errors :/
Reply
#4

Quote:

C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(122) : error 017: undefined symbol "string"
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(122) : error 017: undefined symbol "string"
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(122) : error 029: invalid expression, assumed zero
C:\Users\Andrew\Desktop\GTA Work\iFreeRoam\gamemodes\iFreeRoam.pwn(122) : fatal error 107: too many error messages on one line

These are the errors
Reply
#5

lol man, errors speak by themselves what do you not understand? its english
Reply
#6

im asking for help not asking u to start giving me a lecture.....Thanks....
Reply
#7

Lol Thanks For The Tip I Fixed It

I have a different problem Now

it kicks the player but doesnt show him why and also it shows the other players but spams them how i make it show up only once, also it says Has been kicked....... and doesnt say the players name. can someone help sorry

Quote:

if(gPlayerLogTries[playerid] == 3)
{
new string[128];
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.");
SendClientMessageToAll(0xF81414, string);
Kick(playerid);

Reply
#8

For the name thing you must add whos name it should show. For example, should it show the admins name that is allready online or the player that typed incorrect password? Ofcourse the player but you have no told that in the code. To get the name place this under or over the new string[128]
pawn Код:
GetPlayerName(playerid,sendername, sizeof(sendername));
and then place 'sendername' in the format like this
pawn Код:
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.",sendername);
Reply
#9

pawn Код:
if(gPlayerLogTries[playerid] == 3)
{
new string[128];
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.", name, reason);
SendClientMessageToAll(0xFF9900AA, string);
SetTimerEx("KickPlayer",1000,0,"i",playerid);
}

pawn Код:
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
Kick(playerid);
}
Reply
#10

Quote:
Originally Posted by Guest123
Посмотреть сообщение
pawn Код:
if(gPlayerLogTries[playerid] == 3)
{
new string[128];
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.", name, reason);
SendClientMessageToAll(0xFF9900AA, string);
SetTimerEx("KickPlayer",1000,0,"i",playerid);
}

pawn Код:
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
Kick(playerid);
}
Why did you put reason in there too? The text already say the reason. And if you put GetPlayerName as serndername you can't use 'name' insted in the string
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)