#1

hello

i added when player is make /id, is can see player Ping
what wrong here? i get error
(26994)
Код:
error 001: expected token: ",", but found ";"
(26999)
Код:
error 028: invalid subscript (not an array or too many subscripts): "GetPlayerPing"
Код:
(26999) : warning 215: expression has no effect
(26994)
Код:
format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid);
(26999)
Код:
 format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing[id]));
full code
Код:
CMD:id(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(IsPlayerConnected(playerid))
	{
		new id, giveplayer[25], sstring[256];
		if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFFFFFFFF,"Syntax: {FFFFFF} /id <Name>");
		{
            if(IsPlayerConnected(id))
            {
				if(id != INVALID_PLAYER_ID)
				{
					GetPlayerName(id, giveplayer, sizeof(giveplayer));
					if(PlayerInfo[id][pSleeping] == 1)
					{
					    if(PlayerInfo[id][pRank] > 0)
						{
							format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid);
							SendClientMessage(playerid, COLOR_WHITE, sstring);
						}
						else
						{
						    format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing[id]));
							SendClientMessage(playerid, COLOR_WHITE, sstring);
						}
					}
					else
					{
						if(PlayerInfo[id][pRank] > 0)
						{
							format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank]),GetPlayerPing(playerid)));
							SendClientMessage(playerid, COLOR_WHITE, sstring);
						}
						else
						{
						    format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember],GetPlayerPing[id]));
							SendClientMessage(playerid, COLOR_WHITE, sstring);
						}
					}
				}
				else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
			}
		    else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
		}
	}
	return 1;
}
Reply
#2

PHP код:
format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid)); 

PHP код:
 format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing(id))); 
Reply
#3

Quote:
Originally Posted by Azula
Посмотреть сообщение
PHP код:
format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid)); 

PHP код:
 format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing(id))); 
Thanks one is done , and 2 still get error :
Код:
 : error 001: expected token: ";", but found ")"
Код:
						    format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing(id)));
and this
Код:
							format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank]),GetPlayerPing(playerid)));
Reply
#4

you need just 2 ) at the end

PHP код:
        format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing(id));
format(sstringsizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank]),GetPlayerPing(playerid)); 
Reply


Forum Jump:


Users browsing this thread: