18.08.2014, 10:19
thanks to these guys for fix.
public OnGameModeInit()
{
SetTimer("MapKill1", 1000, 1);
SetTimer("MapKill2", 1000, 1);
return 1;
}
forward MapKill1();
public MapKill1()
{
TextDrawHideForAll(Textdraw12);
new string[16];
format(string, sizeof string, "%d", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string);
TextDrawShowForAll(Textdraw12);
return 1;
}
forward MapKill2();
public MapKill2()
{
TextDrawHideForAll(Textdraw13);
new string[16];
format(string, sizeof string, "%d", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string);
TextDrawShowForAll(Textdraw13);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new string[20];
if(pInfo[killerid][Team] == 1)
{
MapKillsSoldiers++;
format(string, sizeof (string), "%i", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string); // Change "Textdraw12" to your MapKillsSoldiers textdraw ID.
}
if(pInfo[killerid][Team] == 2)
{
MapKillsTerrorists++;
format(string, sizeof (string), "%i", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string); // Change "Textdraw13" to your MapKillsTerrorists textdraw ID.
}
return 1;
}
pawn Код:
|
Should work.
pawn Код:
|
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID) return 1;
new string[12];
if(pInfo[killerid][Team] == 1)
{
MapKillsSoldiers++;
format(string, sizeof (string), "%i", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string); // Change "Textdraw12" to your MapKillsSoldiers textdraw ID.
}
if(pInfo[killerid][Team] == 2)
{
MapKillsTerrorists++;
format(string, sizeof (string), "%i", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string); // Change "Textdraw13" to your MapKillsTerrorists textdraw ID.
}
return 1;
}