[Ajuda] OnPlayerText personalizada
#1

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);
    }
Reply
#2

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(playeridpnamesizeof(pname));
        
format(stringsizeof(string), "[ ID %d ] [ ADM ] %s: %s"playeridpnametext);//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(playeridpnamesizeof(pname));
        
format(stringsizeof(string), "[ ID %d ] %s: %s"playeridpnametext);//aki vocк inverteu os parametros de playerid e pname
        
SendClientMessageToAll(GetPlayerColor(playerid), string);
    } 
Reply
#3

Vocк nгo entendeu, a variбvel estб certa.
PlayerInfo nгo й, meu gm usa pInfo, pLevel nгo й, meu gm usa Level!!!
Reply
#4

Aff era PInfo e nгo pInfo
obrigado ae, ja corrigi os erros!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)