SA-MP Forums Archive
Scripting Help 2 - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripting Help 2 (/showthread.php?tid=188521)



Scripting Help 2 - Buzzbomb - 07.11.2010

Hi I seen a few servers i was on and it showed the players name by the map and i searched wiki on how to show the text i cant find it could someone give me a example of one dont half to be by the map ill try adjust the position unless you want to please help thanks


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Guess not


Re: Scripting Help 2 - -Rebel Son- - 09.11.2010

What exactly do you mean? YOUR name next to the map?


Re: Scripting Help 2 - Steven82 - 09.11.2010

I'm thinking so like a textdraw saying the players name or something idk


Re: Scripting Help 2 - Hal - 09.11.2010

Quote:
Originally Posted by Buzzbomb
Посмотреть сообщение
Hi I seen a few servers i was on and it showed the players name by the map and i searched wiki on how to show the text i cant find it could someone give me a example of one dont half to be by the map ill try adjust the position unless you want to please help thanks
STOP spamming the boards with the same topic. Gosh, just reply on your old topic and dont make new ones.


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Quote:
Originally Posted by Hal
Посмотреть сообщение
STOP spamming the boards with the same topic. Gosh, just reply on your old topic and dont make new ones.
What TOPIC You Forum STALKER


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
What exactly do you mean? YOUR name next to the map?
Yeah when a player joins and Is Connected they will see there Player Name Above map


Re: Scripting Help 2 - -Rebel Son- - 09.11.2010

Oh, that's easy! make the text draw, then use a string from there. :P Make the textdraw and ill help you set it up!


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
Oh, that's easy! make the text draw, then use a string from there. :P Make the textdraw and ill help you set it up!
Okay this what i've done so far but don't appear on the screen

Код:
forward playertextdraw(playerid);
Код:
new Text:Textdraw0[MAX_PLAYERS];
Код:
public playertextdraw(playerid)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    Textdraw0[playerid] = TextDrawCreate(29.000000, 334.000000, name);
    TextDrawBackgroundColor(Textdraw0[playerid], 255);
    TextDrawFont(Textdraw0[playerid], 1);
    TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
    TextDrawColor(Textdraw0[playerid], 65535);
    TextDrawSetOutline(Textdraw0[playerid], 1);
    TextDrawSetProportional(Textdraw0[playerid], 1);
    TextDrawSetString(Textdraw0[playerid], name);
    
    return 1;
}
And this Under OnPlayerSpawn

Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerClock(playerid, 0);
    SetPlayerColor( playerid, COLOR_WHITE );
	//SetPlayerInterior(playerid,0);
	SetPlayerInterior(playerid,1);
	SetPlayerPos(playerid, 1.3173,29.7461,1199.6012);
	SetPlayerSkin(playerid, 217);
	TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
	return 1;
}
I've even added this On Player spawn and Gamemodeinit Still didn't work i'm out of ideals or I'm completely Stupid ??
Код:
 
TextDrawShowForPlayer(TextDraw0[playerid]);
But i tried 5 different ways still dont appear i just put it back in forward playertextdraw
and made a public playertextdraw But i have no clue why it did not show up unless i wrote it wrong or forgot something


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Bump! Bump! Bump!


Re: Scripting Help 2 - Hal - 09.11.2010

Quote:
Originally Posted by Buzzbomb
Посмотреть сообщение
Bump! Bump! Bump!
Read the post above you idiot.


Re: Scripting Help 2 - Buzzbomb - 09.11.2010

Quote:
Originally Posted by Hal
Посмотреть сообщение
Read the post above you idiot.
Let me tell you something buddy Don't comment on my Topics with your stupidity and Name calling you four eyed Little Bastard!


Re: Scripting Help 2 - Buzzbomb - 10.11.2010

This must be a hard one 109 views and No Ideals? But hal being a retard telling me to view my own POST hello DIDNT work.. DUH try it


Re: Scripting Help 2 - Buzzbomb - 10.11.2010

Quote:
Originally Posted by Buzzbomb
Посмотреть сообщение
Okay this what i've done so far but don't appear on the screen

Код:
forward playertextdraw(playerid);
Код:
new Text:Textdraw0[MAX_PLAYERS];
Код:
public playertextdraw(playerid)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    Textdraw0[playerid] = TextDrawCreate(29.000000, 334.000000, name);
    TextDrawBackgroundColor(Textdraw0[playerid], 255);
    TextDrawFont(Textdraw0[playerid], 1);
    TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
    TextDrawColor(Textdraw0[playerid], 65535);
    TextDrawSetOutline(Textdraw0[playerid], 1);
    TextDrawSetProportional(Textdraw0[playerid], 1);
    TextDrawSetString(Textdraw0[playerid], name);
    
    return 1;
}
And this Under OnPlayerSpawn

Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerClock(playerid, 0);
    SetPlayerColor( playerid, COLOR_WHITE );
	//SetPlayerInterior(playerid,0);
	SetPlayerInterior(playerid,1);
	SetPlayerPos(playerid, 1.3173,29.7461,1199.6012);
	SetPlayerSkin(playerid, 217);
	TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
	return 1;
}
I've even added this On Player spawn and Gamemodeinit Still didn't work i'm out of ideals or I'm completely Stupid ??
Код:
 
TextDrawShowForPlayer(TextDraw0[playerid]);
But i tried 5 different ways still dont appear i just put it back in forward playertextdraw
and made a public playertextdraw But i have no clue why it did not show up unless i wrote it wrong or forgot something
Hello BUMP!


Re: Scripting Help 2 - Buzzbomb - 10.11.2010

Now i know why people just copy and paste scripts Cant get no help HERE!!!!!!!!!


Re: Scripting Help 2 - Buzzbomb - 10.11.2010

??BUMP


Re: Scripting Help 2 - The_Moddler - 10.11.2010

pawn Код:
new Text:NameText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    NameText[playerid] = TextDrawCreate(52.000000, 428.000000, " ");
    TextDrawBackgroundColor(NameText[playerid], 255);
    TextDrawFont(NameText[playerid], 1);
    TextDrawLetterSize(NameText[playerid], 0.330000, 1.100000);
    TextDrawColor(NameText[playerid], -1);
    TextDrawSetOutline(NameText[playerid], 1);
    TextDrawSetProportional(NameText[playerid], 1);
    SetTimerEx("SetTextdraw", 2000, false, "i", playerid);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    TextDrawDestroy(NameText[playerid]);
    return 1;
}

forward SetTextdraw(playerid);
public SetTextdraw(playerid)
{
    new name[25], string[25];
    GetPlayerName(playerid, name, 25);
    format(string, 25, "%s", name);
    TextDrawSetString(NameText[playerid], string);
    TextDrawShowForPlayer(playerid, NameText[playerid]);
    return 1;
}



Re: Scripting Help 2 - Buzzbomb - 10.11.2010

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
pawn Код:
new Text:NameText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    NameText[playerid] = TextDrawCreate(52.000000, 428.000000, " ");
    TextDrawBackgroundColor(NameText[playerid], 255);
    TextDrawFont(NameText[playerid], 1);
    TextDrawLetterSize(NameText[playerid], 0.330000, 1.100000);
    TextDrawColor(NameText[playerid], -1);
    TextDrawSetOutline(NameText[playerid], 1);
    TextDrawSetProportional(NameText[playerid], 1);
    SetTimerEx("SetTextdraw", 2000, false, "i", playerid);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    TextDrawDestroy(NameText[playerid]);
    return 1;
}

forward SetTextdraw(playerid);
public SetTextdraw(playerid)
{
    new name[25], string[25];
    GetPlayerName(playerid, name, 25);
    format(string, 25, "%s", name);
    TextDrawSetString(NameText[playerid], string);
    TextDrawShowForPlayer(playerid, NameText[playerid]);
    return 1;
}
Thank you! The_Moddler