help pls!
#1

i made textdraw that is like, when i join as BALLAS it will show textdraw of it that will be like "Player has joined as BALLAS" but when i joined another team like GROVE so it should move the BALLAS textdraw below it and show like this, but it's not moving like that it's just changed the textdraw to the new one i wanna move the old textdraw below to the new one

-----------------------------------
"Player has joined as GROVE" < current one

"Player has joined as BALLAS" < old one that will move below it , it shouldn't get disappeared just move below to
-----------------------------------
the new one


same with other gang i got BALLAS, GROVE, VAGOS, AZTECAS


code:

PHP код:
//gang join textdraw
new Text:gangname[MAX_PLAYERS];
public 
OnPlayerRequestSpawn(playerid)
{
    new 
pname[MAX_PLAYER_NAME], string[128], gname[10];
    if(
gTeam[playerid] == 0format(gnamesizeof(gname), "BALLAS");
    else if(
gTeam[playerid] == 1format(gnamesizeof(gname), "GROVE");
    else if(
gTeam[playerid] == 2format(gnamesizeof(gname), "VAGOS");
    else if(
gTeam[playerid] == 3format(gnamesizeof(gname), "AZTECAS");
    
GetPlayerName(playeridpnamesizeof(pname)); 
    
format(stringsizeof(string), "~r~%s ~w~has spawned as ~y~%s"pnamegname);
    
TextDrawSetString(gangname[playerid], string); 
    
TextDrawShowForPlayer(playeridgangname[playerid]);
        return 
1;
}
public 
LoadTextDraws()
{
    for(new 
0MAX_PLAYERSi++)
    {
    
gangname[i] = TextDrawCreate(1.129997195.226608"_");
    
TextDrawLetterSize(gangname[i], 0.2277001.720800);
    
TextDrawAlignment(gangname[i], 1);
    
TextDrawColor(gangname[i], -1378294017);
    
TextDrawSetShadow(gangname[i], 0);
    
TextDrawSetOutline(gangname[i], 1);
    
TextDrawBackgroundColor(gangname[i], 255);
    
TextDrawFont(gangname[i], 3);
    
TextDrawSetProportional(gangname[i], 1);
    
TextDrawSetShadow(gangname[i], 0);
    }

Reply
#2

bro can u do it with my codes because i don't get yours it's hard to understand in your style
Reply
#3

it's request spawn not request class

EDIT: do i have to make textdraw again and again like make textdraw for ballas then grove and vagos and aztecas can't it can be done with one textdraw
Reply
#4

pls help
Reply
#5

Quote:
Originally Posted by DeStRoY232
Посмотреть сообщение
it's request spawn not request class

EDIT: do i have to make textdraw again and again like make textdraw for ballas then grove and vagos and aztecas can't it can be done with one textdraw
Worse u have to reinstall ur OS
Reply
#6

what?
Reply
#7

i explained this to you on your other topic but it seems like you didnt get it
Код:
new Team_Message1[128];
new Team_Message2[128];

public OnPlayerRequestSpawn(playerid)
{
    new pname[MAX_PLAYER_NAME], string[128], gname[10];

    if(gTeam[playerid] == 0) format(gname, sizeof(gname), "BALLAS");
    else if(gTeam[playerid] == 1) format(gname, sizeof(gname), "GROVE");
    else if(gTeam[playerid] == 2) format(gname, sizeof(gname), "VAGOS");
    else if(gTeam[playerid] == 3) format(gname, sizeof(gname), "AZTECAS");

    GetPlayerName(playerid, pname, sizeof(pname));
	format(Team_Message2, 170, Team_Message1);
	format(Team_Message1,sizeof Team_Message1,"~r~%s Has Spawned as ~y~%d.", pname. gname);
	format(string, sizeof(string), "%s~n~%s", Team_Message1, Team_Message2);
    TextDrawSetString(gangname[playerid], string);
    TextDrawShowForPlayer(playerid, gangname[playerid]);
	return 1;
}
Reply
#8

i have made like this :

PHP код:
static count 0;
new 
Text:teamjointd[4];
public 
OnPlayerRequestClass(playeridclassid)
{
    for(new 
04i++)
    {
        
TextDrawHideForAll(teamjointd[i]);
    }    
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    for(new 
04i++)
    {
        
TextDrawShowForAll(teamjointd[i]);
     }
    new 
pname[MAX_PLAYER_NAME], string[128], gname[10];
    if(
gTeam[playerid] == 0format(gnamesizeof(gname), "BALLAS");
    else if(
gTeam[playerid] == 1format(gnamesizeof(gname), "GROVE");
    else if(
gTeam[playerid] == 2format(gnamesizeof(gname), "VAGOS");
    else if(
gTeam[playerid] == 3format(gnamesizeof(gname), "AZTECAS");
    
GetPlayerName(playeridpnamesizeof(pname));
    switch(
count)
    {
        case 
0:
        {
            
format(stringsizeof(string), "~r~%s ~w~has joined ~y~%s ~w~team"pnamegname);
            
TextDrawSetString(teamjointd[0], string);
            
count 1;
        }
        case 
1:
        {
            
format(stringsizeof(string), "~n~~r~%s ~w~has joined ~y~%s ~w~team"pnamegname);
            
TextDrawSetString(teamjointd[0], string);
            
count 2;
        }
        case 
2:
        {
            
format(stringsizeof(string), "~n~~n~~r~%s ~w~has joined ~y~%s ~w~team"pnamegname);
            
TextDrawSetString(teamjointd[0], string);
            
count 3;
        }
        case 
3:
        {
            
format(stringsizeof(string), "~n~~n~~n~~r~%s ~w~has joined ~y~%s ~w~team"pnamegname);
            
TextDrawSetString(teamjointd[0], string);
            
count 0;
        }
    }
    return 
1;
}
forward LoadTextDraws();
public 
LoadTextDraws()
{
        
teamjointd[0] = TextDrawCreate(4.666670193.186706"_");
    
TextDrawLetterSize(teamjointd[0], 0.1774011.720800);
    
TextDrawAlignment(teamjointd[0], 1);
    
TextDrawColor(teamjointd[0], -1378294017);
    
TextDrawSetShadow(teamjointd[0], 0);
    
TextDrawSetOutline(teamjointd[0], 1);
    
TextDrawBackgroundColor(teamjointd[0], 255);
    
TextDrawFont(teamjointd[0], 3);
    
TextDrawSetProportional(teamjointd[0], 1);
    
TextDrawSetShadow(teamjointd[0], 0); 
        
teamjointd[1] = TextDrawCreate(29.199960170.586654"_");
    
TextDrawLetterSize(teamjointd[1], 0.4000001.600000);
    
TextDrawTextSize(teamjointd[1], 0.000000295.000000);
    
TextDrawAlignment(teamjointd[1], 2);
    
TextDrawColor(teamjointd[1], -1);
    
TextDrawUseBox(teamjointd[1], 1);
    
TextDrawBoxColor(teamjointd[1], 255);
    
TextDrawSetShadow(teamjointd[1], 0);
    
TextDrawSetOutline(teamjointd[1], 0);
    
TextDrawBackgroundColor(teamjointd[1], 255);
    
TextDrawFont(teamjointd[1], 1);
    
TextDrawSetProportional(teamjointd[1], 1);
    
TextDrawSetShadow(teamjointd[1], 0);
    
teamjointd[2] = TextDrawCreate(29.199960191.093368"_");
    
TextDrawLetterSize(teamjointd[2], 0.40960017.857463);
    
TextDrawTextSize(teamjointd[2], 0.000000295.000000);
    
TextDrawAlignment(teamjointd[2], 2);
    
TextDrawColor(teamjointd[2], -1);
    
TextDrawUseBox(teamjointd[2], 1);
    
TextDrawBoxColor(teamjointd[2], 842150450);
    
TextDrawSetShadow(teamjointd[2], 0);
    
TextDrawSetOutline(teamjointd[2], 0);
    
TextDrawBackgroundColor(teamjointd[2], 255);
    
TextDrawFont(teamjointd[2], 1);
    
TextDrawSetProportional(teamjointd[2], 1);
    
TextDrawSetShadow(teamjointd[2], 0);
    
teamjointd[3] = TextDrawCreate(47.599987168.346527"Team_Join");
    
TextDrawLetterSize(teamjointd[3], 0.4000001.600000);
    
TextDrawAlignment(teamjointd[3], 1);
    
TextDrawColor(teamjointd[3], -5963521);
    
TextDrawSetShadow(teamjointd[3], 0);
    
TextDrawSetOutline(teamjointd[3], 1);
    
TextDrawBackgroundColor(teamjointd[3], 255);
    
TextDrawFont(teamjointd[3], 1);
    
TextDrawSetProportional(teamjointd[3], 1);
    
TextDrawSetShadow(teamjointd[3], 0);

but it's bugged see this, whenever i joined new team it created this line | and move the current message below it

Reply
#9

did you even tried the code i posted above?
Reply
#10

yeah it's not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)