public OnPlayerDeath(playerid, killerid, reason){ new kScore = 1,pScore = -1,string[128],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME]; GetPlayerName(killerid, name2, sizeof(name2)); GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), \"{00FF00}[Kill]: Megölted {FF0000}%s(%d){00FF00}-t +500$ és 1 pont\", name, playerid); ShowPlayerDialog(killerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\"); format(string, sizeof(string), \"{00FF00}[Kill]: {FF0000}%s(%d){00FF00} Megölt -500$ és -1 pont\", name2, killerid); ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\"); GivePlayerMoney(killerid, 500); GivePlayerMoney(playerid, -500); SetPlayerScore(playerid, GetPlayerScore(playerid) + pScore); SetPlayerScore(killerid, GetPlayerScore(killerid) + kScore); return 1;}
Amit te írtál, az nem csak hibás, de rohadt sok memóriát pazarol..Kód: [Kijelölés][pawn]public OnPlayerDeath(playerid, killerid, reason){ new kScore = 1, pScore = -1, string[128], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME]; GetPlayerName(killerid, name2, sizeof(name2)); GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), \"{00FF00}[Kill]: Megölted {FF0000}%s(%d){00FF00}-t +500$ és 1 pont\", name, playerid); ShowPlayerDialog(killerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\"); format(string, sizeof(string), \"{00FF00}[Kill]: {FF0000}%s(%d){00FF00} Megölt -500$ és -1 pont\", name2, killerid); ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\"); GivePlayerMoney(killerid, 500); GivePlayerMoney(playerid, -500); SetPlayerScore(playerid, GetPlayerScore(playerid) + pScore); SetPlayerScore(killerid, GetPlayerScore(killerid) + kScore); return 1;}[/pawn] [/quote]oksam :/ nem baj ha b e tezsem a fõ postba?
public OnPlayerDeath(playerid, killerid, reason){newstring[128 + MAX_PLAYER_NAME + 1];GetPlayerName(playerid, string, MAX_PLAYER_NAME);format(string, sizeof(string), \"{00FF00}[Kill]: Megölted {FF0000}%s(%d){00FF00}-t +500$ és 1 pont\", string, playerid);ShowPlayerDialog(killerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\");string[0] = EOS;GetPlayerName(killerid, string, MAX_PLAYER_NAME);format(string, sizeof(string), \"{00FF00}[Kill]: {FF0000}%s(%d){00FF00} Megölt -500$ és -1 pont\", string, killerid);ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, \"{00FF00}.::{FF0000}Kill{00FF00}::.\", string, \"Rendben\",\"Vissza\");GivePlayerMoney(killerid, 500);GivePlayerMoney(playerid, -500);SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);return 1;}