SA-MP Forums Archive
Help error 035 / warning 202 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help error 035 / warning 202 (/showthread.php?tid=422115)



Help error 035 / warning 202 - proSeryoga - 12.03.2013

Hello
TAB: 999
Textdrawn 0/0 0 ...

Code:

Код:
#include <a_samp>
new PlayerText:KillsLevel[MAX_PLAYERS];
public OnFilterScriptExit()
{
	for(new i = GetMaxPlayers() - 1; i != -1; i--)
	{
		if(!IsPlayerConnected(i)) continue;
		PlayerTextDrawDestroy(i, KillsLevel[i]);
	}
	return 1;
}
public OnPlayerConnect(playerid)
{
	KillsLevel[playerid] = CreatePlayerTextDraw(playerid, 499.0, 101.0, "Kills: 0/0\nLevel: 0");
	PlayerTextDrawFont(playerid, KillsLevel[playerid], 1);
	PlayerTextDrawLetterSize(playerid, KillsLevel[playerid], 0.34, 1.5);
	PlayerTextDrawSetOutline(playerid, KillsLevel[playerid], 1);
	PlayerTextDrawColor(playerid, KillsLevel[playerid], 0xFDE39DFF);
	PlayerTextDrawAlignment(playerid, KillsLevel[playerid], 1);
	PlayerTextDrawShow(playerid, KillsLevel[playerid]);
	return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
	#pragma unused reason
	PlayerTextDrawDestroy(playerid, KillsLevel[playerid]);
	return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
	#pragma unused reason
        SetPlayerScore (killerid, GetPlayerScore (killerid) + 1);
        new kills = GetPlayerScore(killerid);
        if(kills % 50 == 0) SetPlayerScore(killerid,GetPlayerScore(playerid) + 1);
        new level = GetPlayerScore(playerid), string[32];
	format(string, sizeof(string), "Level: %d\nKills: %d/%d", level, kills, level * 50);
	PlayerTextDrawSetString(killerid, KillsLevel[killerid], string);
	return 1;
}



Re: Help error 035 / warning 202 - mineralo - 12.03.2013

pawn Код:
SetPlayerScore (killerid, GetPlayerScore (killerid) + 1);
    new kills = GetPlayerScore(killerid);
    if(kills % 50 == 0) SetPlayerScore(killerid,GetPlayerScore(playerid) + 1);
    new level = GetPlayerScore(playerid), string[32];



Re: Help error 035 / warning 202 - proSeryoga - 12.03.2013

Quote:
Originally Posted by mineralo
Посмотреть сообщение
pawn Код:
SetPlayerScore (killerid, GetPlayerScore (killerid) + 1);
    new kills = GetPlayerScore(killerid);
    if(kills % 50 == 0) SetPlayerScore(killerid,GetPlayerScore(playerid) + 1);
    new level = GetPlayerScore(playerid), string[32];
Omg
Tab score 999
textdraw 0
?


Re: Help error 035 / warning 202 - proSeryoga - 12.03.2013

Helppp
Tab: 999
Textdraw: 0