31.05.2016, 01:22
I have made this script with the intention to display the IP of a player when he connects
the message is not shown however, why would that be?
Also, my givegun script is acting weird - I have put:
But if I put in a value between 1-999 (e.g 500) it says it the ammo must be between 1-999.
I have seen this in the server console: sscanf warning: Format specifier does not match parameter count.
What does this mean?
Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME], string[128];
new para1, ip[17];
GetPlayerName(para1, name, sizeof(name));
GetPlayerIp(para1, ip, sizeof(ip));
if(Player[playerid][pAdmin] >= 1 && IsPlayerAdmin(playerid))
format(string, sizeof(string), "[ADMIN] Player %s has connected with IP: %d", name, ip);
SendAdminMessage(-1, string);
return 1;
}
Also, my givegun script is acting weird - I have put:
Код:
if(!( 1 <= ammo <= 999 )) return SCM(playerid, -1, "The gun ammo must be between 1-999!");
I have seen this in the server console: sscanf warning: Format specifier does not match parameter count.
What does this mean?


