06.03.2013, 10:26
Kills:3
Deaths:2
Killingspree:1
Ratio:1.50
Here is the code, but I want to update it (textdrawsetstring) in (onplayerdeath).....
Code:
OnPlayerDeath:
/dm1
/exitdm
Deaths:2
Killingspree:1
Ratio:1.50
Here is the code, but I want to update it (textdrawsetstring) in (onplayerdeath).....
Code:
Код:
new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; new Text:Textdraw3; new Text:Textdraw4; Textdraw0 = TextDrawCreate(391.176483, 319.416687, "Box"); TextDrawLetterSize(Textdraw0, 0.000000, 7.461111); TextDrawTextSize(Textdraw0, 260.588226, 0.000000); TextDrawAlignment(Textdraw0, 1); TextDrawColor(Textdraw0, 0); TextDrawUseBox(Textdraw0, true); TextDrawBoxColor(Textdraw0, 102); TextDrawSetShadow(Textdraw0, 0); TextDrawSetOutline(Textdraw0, 0); TextDrawFont(Textdraw0, 0); Textdraw1 = TextDrawCreate(265.882415, 317.333282, "Kills:"); TextDrawLetterSize(Textdraw1, 0.449999, 1.600000); TextDrawAlignment(Textdraw1, 1); TextDrawColor(Textdraw1, -1); TextDrawSetShadow(Textdraw1, 0); TextDrawSetOutline(Textdraw1, 1); TextDrawBackgroundColor(Textdraw1, 51); TextDrawFont(Textdraw1, 1); TextDrawSetProportional(Textdraw1, 1); Textdraw2 = TextDrawCreate(265.882293, 334.833312, "Deaths:"); TextDrawLetterSize(Textdraw2, 0.449999, 1.600000); TextDrawAlignment(Textdraw2, 1); TextDrawColor(Textdraw2, -1); TextDrawSetShadow(Textdraw2, 0); TextDrawSetOutline(Textdraw2, 1); TextDrawBackgroundColor(Textdraw2, 51); TextDrawFont(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); Textdraw3 = TextDrawCreate(265.411743, 350.583312, "Killingspree:"); TextDrawLetterSize(Textdraw3, 0.449999, 1.600000); TextDrawAlignment(Textdraw3, 1); TextDrawColor(Textdraw3, -1); TextDrawSetShadow(Textdraw3, 0); TextDrawSetOutline(Textdraw3, 1); TextDrawBackgroundColor(Textdraw3, 51); TextDrawFont(Textdraw3, 1); TextDrawSetProportional(Textdraw3, 1); Textdraw4 = TextDrawCreate(265.882354, 366.916778, "Ratio:"); TextDrawLetterSize(Textdraw4, 0.449999, 1.600000); TextDrawAlignment(Textdraw4, 1); TextDrawColor(Textdraw4, -1); TextDrawSetShadow(Textdraw4, 0); TextDrawSetOutline(Textdraw4, 1); TextDrawBackgroundColor(Textdraw4, 51); TextDrawFont(Textdraw4, 1); TextDrawSetProportional(Textdraw4, 1);
OnPlayerDeath:
Код:
if(DM[playerid] > 0) { SetPlayerScore(killerid,GetPlayerScore(killerid)+2); SetPlayerHealth(killerid,100); GivePlayerMoney(killerid,0,2000); return true; }
Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0) { dm1players++; SetScoreData(); ResetPlayerWeapons(playerid); new dm1spawn = random(6); SetPlayerPos(playerid, RandomDM1Spawns[dm1spawn][0],RandomDM1Spawns[dm1spawn][1],RandomDM1Spawns[dm1spawn][2]); SetPlayerFacingAngle(playerid,RandomDM1Spawns[dm1spawn][3]); SetPlayerVirtualWorld(playerid,88); TogglePlayerControllable(playerid,true); SetPlayerInterior(playerid,0); GivePlayerWeapon(playerid,16,9999); GivePlayerWeapon(playerid,35,9999); SetPlayerHealth(playerid,100); return true; }
Код:
if (strcmp("/exitdm", cmdtext, true, 10) == 0) { new PlayerName[24]; GetPlayerName(playerid,PlayerName,sizeof(PlayerName)); AccountInfo[playerid][DMLeft] = 1; if(DM[playerid] == 1) { dm1players--; SetScoreData(); SetPlayerVirtualWorld(playerid,0); ResetPlayerWeapons(playerid); SpawnPlayer(playerid); DM[playerid] = 0; return true; } }