joined with ip problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: joined with ip problem (
/showthread.php?tid=470474)
joined with ip problem -
Another1 - 18.10.2013
Код:
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerAdmin(playerid)) return
new h_name[MAX_PLAYER_NAME], str[100], ping[25];
GetPlayerName(playerid, h_name,sizeof (h_name));
GetPlayerIp(playerid, ping,sizeof (ping));
format(str,sizeof (str),"%s has joined server(%s)",h_name, ping);
SCM(i, 0x808080AA, str);
}
PHP код:
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(203) : error 029: invalid expression, assumed zero
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(203) : error 017: undefined symbol "h_name"
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(203) : warning 215: expression has no effect
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(203) : error 001: expected token: ";", but found "]"
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(203) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: joined with ip problem -
Threshold - 18.10.2013
Try:
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerAdmin(playerid)) return 1;
new h_name[MAX_PLAYER_NAME], str[100], ping[25];
GetPlayerName(playerid, h_name,sizeof (h_name));
GetPlayerIp(playerid, ping,sizeof (ping));
format(str,sizeof (str),"%s has joined server(%s)",h_name, ping);
SCM(i, 0x808080AA, str);
}