hab einen winzig kleinen problem:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
new str[256];
new giveplayer[24];
new PlayerName[24];
new RecName[24];
GetPlayerName(recieverid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(!IsPlayerConnected(recieverid))
return SendClientMessage(playerid, 0xAFAFAFAA, "Ungültige ID!");
if(recieverid == playerid)
return SendClientMessage(playerid, 0xAFAFAFAA, "SERVER: Du kannst dir nicht selber eine PM schreiben.");
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Private Nachricht ~r~gesendet~y~.", 3000, 3);
GameTextForPlayer(recieverid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Private Nachricht ~r~erhalten~y~.", 3000, 3);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
PlayerPlaySound(recieverid, 1057, 0.0, 0.0, 0.0);
format(str, sizeof(str), "PM von %s(%i): %s", PlayerName, playerid, text);
SendClientMessage(recieverid, 0x33AAFFFF, str);
{
format(str, sizeof(str), "PM gesendet zu %s(%i): %s", RecName, recieverid, text);
SendClientMessage(playerid, 0x33AAFFFF, str);
}
return true;
}
Zitat(9386) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
weiß einer was das zu bedeuten hat?
die reihe 9386 ist: new PlayerName[24];