xp system not working textdraw not display.
#1

guys m using this xp system its not working textdraw not displaying plz help.



Код:
//xp

#include <a_samp>

new Text:EXPINFO;
new Text:Box;
new Text:Bar[MAX_PLAYERS];
new Text:Number[MAX_PLAYERS];

public OnFilterScriptInit()
{
    EXPINFO = TextDrawCreate(259.000000, 385.000000, "EXPSYSTEM");
	TextDrawBackgroundColor(EXPINFO, 255);
	TextDrawFont(EXPINFO, 1);
	TextDrawLetterSize(EXPINFO,0.490000, 1.200000);
	TextDrawColor(EXPINFO,-16776961);
 	TextDrawSetOutline(EXPINFO, 0);
	TextDrawSetProportional(EXPINFO, 1);
	TextDrawSetShadow(EXPINFO, 1);
	Box = TextDrawCreate(260.000000, 398.000000, "~n~");
	TextDrawBackgroundColor(Box,255);
 	TextDrawFont(Box, 1);
	TextDrawLetterSize(Box,0.500000, 1.000000);
	TextDrawColor(Box, -1);
	TextDrawSetOutline(Box, 0);
	TextDrawSetProportional(Box, 1);
	TextDrawSetShadow(Box, 1);
	TextDrawUseBox(Box, 1);
	TextDrawBoxColor(Box, 3284530);
	TextDrawTextSize(Box,355.000000, 0.000000);
	
	for(new playerid = 0; playerid <
	MAX_PLAYERS; playerid++)
	{
	Bar[playerid] = TextDrawCreate(260.000000,395.000000, "get a kill");
	TextDrawBackgroundColor(Bar[playerid], 255);
	TextDrawFont(Bar[playerid],1);
	TextDrawLetterSize(Bar[playerid], 0.500000, 1.599999);
	TextDrawColor(Bar[playerid],-1);
	TextDrawSetOutline(Bar[playerid], 0);
	TextDrawSetProportional(Bar[playerid], 1);
	TextDrawSetShadow(Bar[playerid], 1);
	Number[playerid] =TextDrawCreate(286.000000,397.000000, "0/~r~15");
	TextDrawBackgroundColor(Number[playerid], 255);
	TextDrawFont(Number[playerid], 1);
	TextDrawLetterSize(Number[playerid], 0.390000, 1.000000);
	TextDrawColor(Number[playerid], -1);
	TextDrawSetOutline(Number[playerid], 0);
	TextDrawSetProportional(Number[playerid], 1);
	TextDrawSetShadow(Number[playerid], 1);
 	}
  	for(new i; i < MAX_PLAYERS; i ++)
	{
	if(IsPlayerConnected(i))
		{
		TextDrawShowForPlayer(i,EXPINFO);
		TextDrawShowForPlayer(i,Box);
		TextDrawShowForPlayer(i,Bar[i]);
		TextDrawShowForPlayer(i,Number[i]);
  		}
   	}
    return 1;
}
public OnPlayerDeath(playerid,killerid, reason)
{
	new msg[64];
	new score = GetPlayerScore(killerid);
  	format(msg, sizeof(msg),"XP:%d/50",score+1);
   	TextDrawSetString(Number[killerid],msg);
	GameTextForPlayer(killerid,"~p~1+ ~w~EXP Experience! ~n~~g~+$12000!!",6000,4);
	
	switch(GetPlayerScore(killerid))
 	{
 		case 1:
		{
		TextDrawSetString(Bar[killerid],"~b~l");
		TextDrawSetString(Number[killerid],"~w~ 1/~r~15");
		}
		case 2:
		{
		TextDrawSetString(Bar[killerid],"~b~ll");
		TextDrawSetString(Number[killerid],"~w~ 2/~r~15");
		}
		case 3:
		{
		TextDrawSetString(Bar[killerid],"~b~lll");
		TextDrawSetString(Number[killerid],"~w~ 3/~r~15");
		}
		case 4:
		{
		TextDrawSetString(Bar[killerid],"~b~llll");
		TextDrawSetString(Number[killerid],"~w~ 4/~r~15");
		}
		case 5:
		{
		TextDrawSetString(Bar[killerid],"~b~lllll");
		TextDrawSetString(Number[killerid],"~w~ 5/~r~15");
		}
		case 6:
		{
		TextDrawSetString(Bar[killerid],"~b~llllll");
		TextDrawSetString(Number[killerid],"~w~ 6/~r~15");
		}
		case 7:
		{
		TextDrawSetString(Bar[killerid],"~b~lllllll");
		TextDrawSetString(Number[killerid],"~w~ 7/~r~15");
		}
		case 8:
		{
		TextDrawSetString(Bar[killerid],"~b~llllllll");
		TextDrawSetString(Number[killerid],"~w~ 8/~r~15");
		}
		case 9:
		{
		TextDrawSetString(Bar[killerid],"~b~lllllllll");
		TextDrawSetString(Number[killerid],"~w~ 9/~r~15");
		}
		case 10:
		{
		TextDrawSetString(Bar[killerid],"~b~llllllllll");
		TextDrawSetString(Number[killerid],"~w~ 10/~r~15");
		}
		case 11:
		{
		TextDrawSetString(Bar[killerid],"~b~lllllllllll");
		TextDrawSetString(Number[killerid],"~w~ 11/~r~15");
		}
		case 12:
		{
		TextDrawSetString(Bar[killerid],"~b~llllllllllll");
		TextDrawSetString(Number[killerid],"~w~ 12/~r~15");
		}
		case 13:
		{
		TextDrawSetString(Bar[killerid],"~b~lllllllllllll");
		TextDrawSetString(Number[killerid],"~w~ 13/~r~15");
		}
		case 14:
		{
		TextDrawSetString(Bar[killerid],"~b~llllllllllllll");
		TextDrawSetString(Number[killerid],"~w~ 14/~r~15");
		}
		case 15:
		{
		TextDrawSetString(Bar[killerid],"~b~lllllllllllllll");
		TextDrawSetString(Number[killerid],"~w~ 15/~r~15");
		}
	}
	return 1;
}

public OnFilterScriptExit()
{
	TextDrawHideForAll(EXPINFO);
	TextDrawDestroy(EXPINFO);
	TextDrawHideForAll(Box);
	TextDrawDestroy(Box);
	for(new playerid = 0; playerid <
	MAX_PLAYERS; playerid++)
	{
	TextDrawHideForAll(Bar[playerid]);
	TextDrawDestroy(Bar[playerid]);
	TextDrawHideForAll(Number[playerid]);
	TextDrawDestroy(Number[playerid]);
	}
  	return 1;
}

public OnPlayerConnect(playerid)
{
     TextDrawShowForPlayer(playerid,EXPINFO);
     TextDrawShowForPlayer(playerid,Box);
     TextDrawShowForPlayer(playerid,Bar[playerid]);
     TextDrawShowForPlayer(playerid,Number[playerid]);
     return 1;
}
Reply
#2

can someone help?
Reply
#3

Quote:

xp system



what is that

elaborate

.
Reply
#4

You have just create text draw
Missing that: https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
Reply
#5

Quote:
Originally Posted by justjamie
Посмотреть сообщение


what is that

elaborate

.
lol r u kidding me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)