//==============================================================================
//OnPlayerDeath
//==============================================================================
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == playerid) return 1; // They either fell, or took self-inflicted damage somehow.
new string[75];
format(string, sizeof(string), "You have killed %s.", GetName(playerid));
SendClientMessage(killerid, -1, string);
format(string, sizeof(string), "You have been killed by %s.", GetName(killerid));
SendClientMessage(playerid, -1, string);
//--------------------------------------------------------------------------
//Settings & Others
//--------------------------------------------------------------------------
SetPlayerVirtualWorld(playerid, 0);
SetPlayerWantedLevel(playerid, 0);
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
}
GivePlayerMoney(killerid, 100);
GivePlayerMoney(playerid, 0);
//--------------------------------------------------------------------------
//Textdraw's Hide/Show
//--------------------------------------------------------------------------
TextDrawShowForPlayer(playerid, Textdraw27);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//TextDrawHideForPlayer(playerid, Textdraw0);
//TextDrawHideForPlayer(playerid, Textdraw4);
//TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw81);
TextDrawHideForPlayer(playerid, Textdraw82);
TextDrawHideForPlayer(playerid, Textdraw83);
TextDrawHideForPlayer(playerid, Textdraw84);
format(string, sizeof(string), "You were killed by %s", GetName(killerid));
TextDrawSetString(the TD, string);
// then show it
public OnPlayerDeath(playerid, killerid, reason) { format(string, sizeof(string), "~g~You got killed By~n~~w~ %s"); GameTextForPlayer(playerid, string, GetName(killerid) ,3000, 3); format(string, sizeof(string), "~g~You killed~n~~w~ %s"); GameTextForPlayer(killerid, string, GetName(playerid) ,3000, 3); }
new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; public OnFilterScriptInit() { // Create the textdraws: Textdraw0 = TextDrawCreate(220.000000, 188.000000, "Box"); TextDrawBackgroundColor(Textdraw0, 16711935); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.000000, 4.000000); TextDrawColor(Textdraw0, -1); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); TextDrawUseBox(Textdraw0, 1); TextDrawBoxColor(Textdraw0, 100); TextDrawTextSize(Textdraw0, 411.000000, 29.000000); Textdraw1 = TextDrawCreate(222.000000, 200.000000, "You got killed by"); TextDrawBackgroundColor(Textdraw1, 255); TextDrawFont(Textdraw1, 3); TextDrawLetterSize(Textdraw1, 0.360000, 1.399999); TextDrawColor(Textdraw1, -1); TextDrawSetOutline(Textdraw1, 0); TextDrawSetProportional(Textdraw1, 1); TextDrawSetShadow(Textdraw1, 1); Textdraw2 = TextDrawCreate(222.000000, 200.000000, "You have killed"); TextDrawBackgroundColor(Textdraw2, 255); TextDrawFont(Textdraw2, 3); TextDrawLetterSize(Textdraw2, 0.360000, 1.399999); TextDrawColor(Textdraw2, -1); TextDrawSetOutline(Textdraw2, 0); TextDrawSetProportional(Textdraw2, 1); TextDrawSetShadow(Textdraw2, 1); for(new i; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { TextDrawShowForPlayer(i, Textdraw0); TextDrawShowForPlayer(i, Textdraw1); TextDrawShowForPlayer(i, Textdraw2); } } return 1; } public OnFilterScriptExit() { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawHideForAll(Textdraw1); TextDrawDestroy(Textdraw1); TextDrawHideForAll(Textdraw2); TextDrawDestroy(Textdraw2); return 1; } public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); return 1; }
you can show this without textdraw
if you want GameTextForPlayer i can make it for you.. Код:
public OnPlayerDeath(playerid, killerid, reason) { format(string, sizeof(string), "~g~You got killed By~n~~w~ %s"); GameTextForPlayer(playerid, string, GetName(killerid) ,3000, 3); format(string, sizeof(string), "~g~You killed~n~~w~ %s"); GameTextForPlayer(killerid, string, GetName(playerid) ,3000, 3); } i'm just want to help you |
C:\Users\Khan_vb\Desktop\Server.UFS\UFS\gamemodes\XSE.pwn(1350) : error 035: argument type mismatch (argument 3) C:\Users\Khan_vb\Desktop\Server.UFS\UFS\gamemodes\XSE.pwn(1352) : error 035: argument type mismatch (argument 3) C:\Users\Khan_vb\Desktop\Server.UFS\UFS\gamemodes\XSE.pwn(13540) : warning 203: symbol is never used: "anims" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.