30.10.2017, 19:15
(
Последний раз редактировалось billy1337samp; 18.11.2017 в 07:27.
)
-removed- -----------
When using const, it means that it cannot be modified. Besides that, when not setting a size for your string, its size becomes 46 in your case but a name can be up to 24 characters and ping can be a 3-digit or 4-digit number so it will be cut.
|
fmt_str[46]
Код HTML:
fmt_str[46] is this the right section where people can improve the script? |
#define MAX_PING 15 //This is the max ping, you need to change it.
public OnPlayerUpdate(playerid) {
if(GetPlayerPing(playerid) > 15) {
//Do some stuff here.
}
return 1;
}
Yeah.
By the way, Here is the code.... PHP код:
|
> 15
#define MAX_PING
> MAX_PING
#define MAX_PING 15
public OnPlayerUpdate(playerid) {
if(GetPlayerPing(playerid) > MAX_PING) {
//Execute code eg. Kick(playerid);
}
return 1;
}
if (IllegalPing[i] == true && GetPlayerPing(i) < MAX_PLAYER_PING)
{
IllegalPing[i] = false;
TogglePlayerControllable(i, true);
}
else if (IllegalPing[i] == false && (GetPlayerPing(i) > MAX_PLAYER_PING) && (GetPlayerPing(i) != 65535))
{
// send message or whatever else
TogglePlayerControllable(i, false);
IllegalPing[i] = true;
}
SORRY, i know i needed help but i spotted a mistake (incase anyone else wants to use that code)
he did Код:
> 15 Код:
#define MAX_PING Код:
> MAX_PING PHP код:
|