OnPlayerText personalizada -
eNtinityGaming - 13.02.2014
Tentei fazer pra quando o player for adm aparecer no chat [ adm ] tal tal. e quando o player nгo for adm aaparece sу o id:
pawn Код:
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(3954) : warning 213: tag mismatch
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(3954) : error 032: array index out of bounds (variable "pInfo")
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(3961) : warning 213: tag mismatch
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(3961) : error 032: array index out of bounds (variable "pInfo")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
pawn Код:
if (pInfo[playerid][Level] >= 1)
{
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[ %d ] [ ADM ] %s: %s", pname, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
if (pInfo[playerid][Level] <= 0)
{
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[ %d ] %s: %s", pname, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
Re: OnPlayerText personalizada -
lucas_mdr1235 - 13.02.2014
tenta assim possivelmente darб certo
PHP код:
if (PlayerInfo[playerid][pLevel] >= 1)//Aki esta errado possivelmente voce deve usar esse tipo de variavel
{
new string[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[ ID %d ] [ ADM ] %s: %s", playerid, pname, text);//aki vocк inverteu os parametros de playerid e pname
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
if (PlayerInfo[playerid][pLevel] <= 0)//Aki tambem esta errado possivelmente voce deve usar esse tipo de variavel
{
new string[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[ ID %d ] %s: %s", playerid, pname, text);//aki vocк inverteu os parametros de playerid e pname
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
Respuesta: OnPlayerText personalizada -
eNtinityGaming - 13.02.2014
Vocк nгo entendeu, a variбvel estб certa.
PlayerInfo nгo й, meu gm usa pInfo, pLevel nгo й, meu gm usa Level!!!
Respuesta: OnPlayerText personalizada -
eNtinityGaming - 13.02.2014
Aff era PInfo e nгo pInfo
obrigado ae, ja corrigi os erros!