01.07.2014, 12:20
PHP код:
CMD:aka(playerid, params[]) {
new id;
if(PlayerInfo[playerid][AdminLevel] >= 2) {
if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aka <id>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
if(id > MAX_PLAYERS || id < 0 || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid Player ID");
new ip[50], PlayerName[MAX_PLAYER_NAME];
GetPlayerIp(id, ip, 50);
GetPlayerName(id, PlayerName, sizeof(PlayerName));
sizeof(String) = dini_Get("ip.history.txt", ip);
if(strlen(string) < 3 || (!strcmp(PlayerName, szString, true)) )
{
format(szString, sizeof(szString),"ERROR: There are no A.K.A's for %s (IP:%s)", PlayerName, ip);
SendClientMessage(playerid, COLOR_RED, szString);
}
else {
new index;
index = strfind(szString, PlayerName, true);
new itmp1[256],itmp2[256];
strmid(itmp1, szString, 0, (index)?index-2:index);
strmid(itmp2, szString,(index)?index+strlen(PlayerName):index+strlen(PlayerName)+2,strlen(szString));
format(szString, sizeof(szString),"--- %s is AKA ---", PlayerName);
SendClientMessage(playerid, COLOR_YELLOW, szString);
format(szString, sizeof(szString),"* A.K.A: %s %s (IP:%s)", itmp1, itmp2, ip);
SendClientMessage(playerid, COLOR_YELLOW, szString);
}
}
else {
return 0;
}
return 1;
}
PHP код:
ERRORS:-C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27192) : error 017: undefined symbol "String"
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27192) : error 029: invalid expression, assumed zero
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27194) : error 017: undefined symbol "string"
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27196) : error 017: undefined symbol "szString"
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27196) : error 017: undefined symbol "szString"
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27196) : error 029: invalid expression, assumed zero
C:\Users\vishal\Desktop\New folder (22)\High Speed Drivers\gamemodes\GG.pwn(27196) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.