Image textdraw problem
#1

So, I don't have any idea about these image textdraws. and I want to do is..
Let's say, We have two teams [Boys vs Girls], If the player is in Boy's team I need to show some man skin head on players screen. if the player is in Girls team, I want to show girl skin head on players screen.

I've converted these images into a textdraw using 3rd party tool named 'IMG2Textdraw' by Gamer931215. It went okay but now i want to show up like i mentioned above

I've got some big *** code after converting my image into a textdraw. How can I add it to the gamemode? and show it according to the player's team

Code to check weather player in girls team or in boys team
Код:
if(team[playerid] == TEAM_BOYS)
Код:
if(team[playerid] == TEAM_GIRLS)
do i have to add that textdraw codes inside that above code ^^ under OnPlayerSpawn?
Reply
#2

Someone? I dont have any idea about this :3
Reply
#3

You said it gave you some "big ass code" after converting it - I'd assume that's the TextDrawCreate lines. Create them under OnGameModeInit, and create a function called "ShowGenderHead" like so:

pawn Код:
forward public ShowGenderHead(playerid);
public ShowGenderHead(playerid)
{
     // Show the TextDraws here that you created under OnGameModeInit;
     // I assume you know how to use TextDrawShowForPlayer.
     return 1;
}
Reply
#4

Quote:
Originally Posted by 2KY
Посмотреть сообщение
You said it gave you some "big ass code" after converting it - I'd assume that's the TextDrawCreate lines. Create them under OnGameModeInit, and create a function called "ShowGenderHead" like so:

pawn Код:
forward public ShowGenderHead(playerid);
public ShowGenderHead(playerid)
{
     // Show the TextDraws here that you created under OnGameModeInit;
     // I assume you know how to use TextDrawShowForPlayer.
     return 1;
}
Yeah, It gave me a code like this

pawn Код:
TextDrawInfo[0][id] = TextDrawCreate(573,351,".");TextDrawTextSize(TextDrawInfo[0][id],1,1);TextDrawSetShadow(TextDrawInfo[0][id],0);TextDrawFont(TextDrawInfo[0][id],2);TextDrawColor(TextDrawInfo[0][id],0x805F33ff);TextDrawInfo[0][used] = 1;
    TextDrawInfo[1][id] = TextDrawCreate(574,351,".");TextDrawTextSize(TextDrawInfo[1][id],1,1);TextDrawSetShadow(TextDrawInfo[1][id],0);TextDrawFont(TextDrawInfo[1][id],2);TextDrawColor(TextDrawInfo[1][id],0xB19669ff);TextDrawInfo[1][used] = 1;
    TextDrawInfo[2][id] = TextDrawCreate(575,351,".");TextDrawTextSize(TextDrawInfo[2][id],1,1);TextDrawSetShadow(TextDrawInfo[2][id],0);TextDrawFont(TextDrawInfo[2][id],2);TextDrawColor(TextDrawInfo[2][id],0xBBA471ff);TextDrawInfo[2][used] = 1;
    TextDrawInfo[3][id] = TextDrawCreate(576,351,".");TextDrawTextSize(TextDrawInfo[3][id],1,1);TextDrawSetShadow(TextDrawInfo[3][id],0);TextDrawFont(TextDrawInfo[3][id],2);TextDrawColor(TextDrawInfo[3][id],0xE0CF96ff);TextDrawInfo[3][used] = 1;
    TextDrawInfo[4][id] = TextDrawCreate(577,351,".");TextDrawTextSize(TextDrawInfo[4][id],1,1);TextDrawSetShadow(TextDrawInfo[4][id],0);TextDrawFont(TextDrawInfo[4][id],2);TextDrawColor(TextDrawInfo[4][id],0xF6E9AEff);TextDrawInfo[4][used] = 1;
    TextDrawInfo[5][id] = TextDrawCreate(578,351,".");TextDrawTextSize(TextDrawInfo[5][id],1,1);TextDrawSetShadow(TextDrawInfo[5][id],0);TextDrawFont(TextDrawInfo[5][id],2);TextDrawColor(TextDrawInfo[5][id],0xFAEDB3ff);TextDrawInfo[5][used] = 1;
    TextDrawInfo[6][id] = TextDrawCreate(579,351,".");TextDrawTextSize(TextDrawInfo[6][id],1,1);TextDrawSetShadow(TextDrawInfo[6][id],0);TextDrawFont(TextDrawInfo[6][id],2);TextDrawColor(TextDrawInfo[6][id],0xFAE9B4ff);TextDrawInfo[6][used] = 1;
    TextDrawInfo[7][id] = TextDrawCreate(580,351,".");TextDrawTextSize(TextDrawInfo[7][id],1,1);TextDrawSetShadow(TextDrawInfo[7][id],0);TextDrawFont(TextDrawInfo[7][id],2);TextDrawColor(TextDrawInfo[7][id],0xECDDABff);TextDrawInfo[7][used] = 1;
    TextDrawInfo[8][id] = TextDrawCreate(581,351,".");TextDrawTextSize(TextDrawInfo[8][id],1,1);TextDrawSetShadow(TextDrawInfo[8][id],0);TextDrawFont(TextDrawInfo[8][id],2);TextDrawColor(TextDrawInfo[8][id],0xD5C69Aff);TextDrawInfo[8][used] = 1;
    TextDrawInfo[9][id] = TextDrawCreate(582,351,".");TextDrawTextSize(TextDrawInfo[9][id],1,1);TextDrawSetShadow(TextDrawInfo[9][id],0);TextDrawFont(TextDrawInfo[9][id],2);TextDrawColor(TextDrawInfo[9][id],0xB9AB81ff);TextDrawInfo[9][used] = 1;
    TextDrawInfo[10][id] = TextDrawCreate(583,351,".");TextDrawTextSize(TextDrawInfo[10][id],1,1);TextDrawSetShadow(TextDrawInfo[10][id],0);TextDrawFont(TextDrawInfo[10][id],2);TextDrawColor(TextDrawInfo[10][id],0xDDCFAAff);TextDrawInfo[10][used] = 1;
    TextDrawInfo[11][id] = TextDrawCreate(584,351,".");TextDrawTextSize(TextDrawInfo[11][id],1,1);TextDrawSetShadow(TextDrawInfo[11][id],0);TextDrawFont(TextDrawInfo[11][id],2);TextDrawColor(TextDrawInfo[11][id],0xD4C6A4ff);TextDrawInfo[11][used] = 1;
    TextDrawInfo[12][id] = TextDrawCreate(571,352,".");TextDrawTextSize(TextDrawInfo[12][id],1,1);TextDrawSetShadow(TextDrawInfo[12][id],0);TextDrawFont(TextDrawInfo[12][id],2);TextDrawColor(TextDrawInfo[12][id],0xC19F7Fff);TextDrawInfo[12][used] = 1;
    TextDrawInfo[13][id] = TextDrawCreate(572,352,".");TextDrawTextSize(TextDrawInfo[13][id],1,1);TextDrawSetShadow(TextDrawInfo[13][id],0);TextDrawFont(TextDrawInfo[13][id],2);TextDrawColor(TextDrawInfo[13][id],0xCFA877ff);TextDrawInfo[13][used] = 1;
    TextDrawInfo[14][id] = TextDrawCreate(573,352,".");TextDrawTextSize(TextDrawInfo[14][id],1,1);TextDrawSetShadow(TextDrawInfo[14][id],0);TextDrawFont(TextDrawInfo[14][id],2);TextDrawColor(TextDrawInfo[14][id],0xE6C184ff);TextDrawInfo[14][used] = 1;
    TextDrawInfo[15][id] = TextDrawCreate(574,352,".");TextDrawTextSize(TextDrawInfo[15][id],1,1);TextDrawSetShadow(TextDrawInfo[15][id],0);TextDrawFont(TextDrawInfo[15][id],2);TextDrawColor(TextDrawInfo[15][id],0xF0D390ff);TextDrawInfo[15][used] = 1;
and How can I show it to the player? I dont have any idea how I can get this done

pawn Код:
TextDrawShowForPlayer(playerid, textdrawname);
What should I type in textdrawname? according to the above image textdraw?
Reply
#5

pawn Код:
TextDrawShowForPlayer(playerid, TextDrawInfo[0][playerid]);
TextDrawShowForPlayer(playerid, TextDrawInfo[1][playerid]);
TextDrawShowForPlayer(playerid, TextDrawInfo[2][playerid]);
...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)