public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string), "%s", text); for (new i; i < 128; i++) { if (string[i] == '@') { if ((string[i + 1] > 47) && (string[i + 1] < 58)) { new id = strval(string[i + 1]); if (id <= 500) { if (IsPlayerConnected(id)) { new menohraca[MAX_PLAYER_NAME]; GetPlayerName(id, menohraca, MAX_PLAYER_NAME); new j = (i + 1); while ((j < (i + 5)) && ((string[j] > 47) && (string[j] < 58))) j++; strdel(string, i, j); strins(string, menohraca, i, 128); } else { SendClientMessage(playerid, 0xFF0000FF, "Zlй ID"); return 0; } } else { SendClientMessage(playerid, 0xFF0000FF, "Zlй ID"); return 0; } } } } SendPlayerMessageToAll(playerid, string); return 0; }
if ((string[i + 1] > 47) && (string[i + 1] < 58))
Can you explain how it does work if it's possible? I stuck in the
pawn Code:
|
CMD:pm(playerid, params[])
{
ReplaceString(string, GetName(id), params);
return 1;
}
C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(4) : error 017: undefined symbol "format" C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(4) : warning 202: number of arguments does not match definition C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(4) : warning 202: number of arguments does not match definition C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(4) : warning 202: number of arguments does not match definition C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(8) : error 017: undefined symbol "strval" C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(10) : error 017: undefined symbol "IsPlayerConnected" C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(11) : error 017: undefined symbol "MAX_PLAYER_NAME" C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(11) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(11) : error 036: empty statement C:\Users\Rodrigo\Desktop\***\filterscripts\Untitled.pwn(11) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.
Can you explain how it does work if it's possible? I stuck in the
pawn Code:
|
if('0' <= string[i + 1] <= '9')