-
public OnPlayerText(playerid,text[]) {
new szChat[144];
if(APlayerData[playerid][PlayerLevel] >= 1) format(szChat,sizeof (szChat),\"[Admin]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, pName(playerid), playerid, text);
else{
if(APlayerData[playerid][PlayerLevel] == 5) format(szChat,sizeof (szChat),\"[Vip]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, pName(playerid), playerid, text);
else format(szChat,sizeof (szChat),\"{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, pName(playerid), playerid, text);//Ez pedig az a rész hogy ha se nem Admin se nem V.I.P. akkor is küldjön üzenetet
}
SendClientMessageToAll(-1, szChat);
return 0;
}
//Ha ilyened már van vedd ki.
stock pName(playerid) {
new name[24];
GetPlayerName(playerid,name,24);
return name;
}
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_Dialogs.inc(530) : warning 219: local variable \"pName\" shadows a variable at a preceding level
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_Dialogs.inc(607) : warning 219: local variable \"pName\" shadows a variable at a preceding level
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_Dialogs.inc(673) : warning 219: local variable \"pName\" shadows a variable at a preceding level
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_Dialogs.inc(739) : warning 219: local variable \"pName\" shadows a variable at a preceding level
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_Dialogs.inc(771) : warning 219: local variable \"pName\" shadows a variable at a preceding level
Mire irjam át?PPC mod mert irogattam mindent de warning :(
-
pName már létezik.. vagyis sok helyen definálva van a módba.. azokat töröld és írd a stockos megoldást.
-
sehol sincs definálva
-
Létrehoztad a változót, de nem használod vagy Értéket adtál neki, de nem használod.
-
de ha kiveszem a stock-ot ami ittvann (meg az egészet)akkor jó
ha kiveszem a stock-ot és átirom azt a 3 pNamet GetPlayerName-ra akkor:
:\\Users\\user\\Desktop\\sajat2.pwn(1765) : warning 217: loose indentation
C:\\Users\\user\\Desktop\\sajat2.pwn(1765) : warning 202: number of arguments does not match definition
C:\\Users\\user\\Desktop\\sajat2.pwn(1765) : warning 202: number of arguments does not match definition
C:\\Users\\user\\Desktop\\sajat2.pwn(1767) : warning 202: number of arguments does not match definition
C:\\Users\\user\\Desktop\\sajat2.pwn(1767) : warning 202: number of arguments does not match definition
C:\\Users\\user\\Desktop\\sajat2.pwn(1768) : warning 202: number of arguments does not match definition
C:\\Users\\user\\Desktop\\sajat2.pwn(1768) : warning 202: number of arguments does not match definition
1765:
if(APlayerData[playerid][PlayerLevel] >= 1) format(szChat,sizeof (szChat),\"[Admin]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, GetPlayerName(playerid), playerid, text);
1767:
if(APlayerData[playerid][PlayerLevel] == 5) format(szChat,sizeof (szChat),\"[Vip]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, GetPlayerName(playerid), playerid, text);
1768:
else format(szChat,sizeof (szChat),\"{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, GetPlayerName(playerid), playerid, text);
-
Mert a GetPlayerName-nek 3 argumentuma van.
-
De akkor mist mit csinaljak??mert ezt rohadtul nem értem
-
new neve[MAX_PLAYER_NAME];
GetPlayerName(playerid, neve, sizeof(neve));
-
pName-t cseréld ki kiskutyara.....
-
Normálisan írjátok már le neki:
new neve[MAX_PLAYER_NAME];
GetPlayerName(playerid, neve, sizeof(neve));
1765:
if(APlayerData[playerid][PlayerLevel] >= 1) format(szChat,sizeof (szChat),\"[Admin]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, neve, playerid, text);
1767:
if(APlayerData[playerid][PlayerLevel] == 5) format(szChat,sizeof (szChat),\"[Vip]{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, neve, playerid, text);
1768:
else format(szChat,sizeof (szChat),\"{%06x}%s{007f9c}(%d): {ffffff}%s\", GetPlayerColor(playerid) >>> 8, neve, playerid, text);
-
csupán azt érzékeltettem hogy akármire de írja át