Jump to content
  • 0

pomoc TextDrawSetString


DeLeTeCZ

Dotaz

Zdravím, mám problém s TextDrawSetString chci udělat textdraw, který by vypisoval kolikrát jste někoho zabil a kolikrát jste umřel ale když někoho zabiju u Kills je pořád 0 to sáme když umřu tak Deaths je pořád 0. Předem dík za pomoc :)

 

Code:

 

public OnPlayerDeath(playerid, killerid, reason)
{
new tdkills[256],tddeath[256];
killy[killerid]++;
smrti[playerid]++;
format(tdkills,sizeof(tdkills),"Kills: ~y~%d",killy[playerid]);
format(tddeath,sizeof(tddeath),"Deaths: ~y~%d,",smrti[playerid]);
TextDrawSetString(Textdraw3[playerid],tdkills);
TextDrawSetString(Textdraw4[playerid],tddeath);
return 0;
}

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0

new tdkills[256],tddeath[256];

killy[killerid]++;

smrti[playerid]++;

format(tdkills,sizeof(tdkills),"Kills: ~y~%d",killy[killerid]);

format(tddeath,sizeof(tddeath),"Deaths: ~y~%d,",smrti[playerid]);

TextDrawSetString(Textdraw3[killerid],tdkills);

TextDrawSetString(Textdraw4[playerid],tddeath);

 

 

skús to takto

Link to comment
Share on other sites

  • 0

new tdkills[256],tddeath[256];

killy[killerid]++;

smrti[playerid]++;

format(tdkills,sizeof(tdkills),"Kills: ~y~%d",killy[killerid]);

format(tddeath,sizeof(tddeath),"Deaths: ~y~%d,",smrti[playerid]);

TextDrawSetString(Textdraw3[killerid],tdkills);

TextDrawSetString(Textdraw4[playerid],tddeath);

 

 

skús to takto

Funguje to akorát když dám třeba /kill nebo se zabiju tak to nepřidá do Deaths pouze když mě někdo zabije

Link to comment
Share on other sites

  • 0

Funguje to akorát když dám třeba /kill nebo se zabiju tak to nepřidá do Deaths pouze když mě někdo zabije

 

Smazáno.. řekl sem blbost

Link to comment
Share on other sites

  • 0

Po setstring musis dat aj textdrawshowforplayer

nemusi.

 

Funguje to akorát když dám třeba /kill nebo se zabiju tak to nepřidá do Deaths pouze když mě někdo zabije

Protoze kdyz neni killerid odesle invalid id myslim 65 536 a to ti pak zasahne do neexistujici promene a callback se zastavi. Takze IsPlayerConnected(killerid)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...