PDA

View Full Version : Texdraw Help +rep


Beljulji
03/10/2012, 03:33 PM
I need help with texdraws so when player join an area like /aa texdraw will show that player joined /aa, giving +rep

Ghost_Boii
03/10/2012, 03:37 PM
What You are saying?

Beljulji
03/10/2012, 03:38 PM
texdraw need to show when player join some area Dm,Stunt or something else LOL

SA-MPDrifter
03/10/2012, 03:38 PM
If you know how to create the TextDraw then just add the script to the command, instead of OnGameModeInit.

.v
03/10/2012, 03:39 PM
I'm not sure what you really mean. If this is not your answer. Well kindly explained it a little bit more clear.

CMD:aa(playerid, params[])
{
SetPlayerPos(playerid, 380.5123,2544.0908,21.0001);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), " %s has Teleported to Abandoned Airport (/aa)",pName);
SendClientMessageToAll(COLOR_WHITE, string);
return 1;
}

gtakillerIV
03/10/2012, 03:39 PM
You want that Text Draw to get seen by everyone in the server?

@.V: My friend he says he wants a TextDraw not a client message ;)

RanSEE
03/10/2012, 03:39 PM
http://wiki.sa-mp.com/wiki/CreatePlayerTextDraw
Thats all you will need.

Beljulji
03/10/2012, 03:40 PM
well i know 50/50 give me an example pls.

hossa
03/10/2012, 03:42 PM
Follow me :D

Put this next after set player postion :D |
"
new string[18];
format(string, sizeof(string), "Welcome To /AA ");
GameTextForPlayer(playerid, string, 1000, 0);
return 1;
}
// Text on Chat :) [ Color = Red ]

GetPlayerName(playerid, Name, sizeof(Name));
format(String,sizeof(String),"Welcome to {FF0000}/AA{00FF00}%s",Name[playerid]);
SendClientMessageToAll(playerid,0xFF0000FF,String) ;


Tell me if it work

Beljulji
03/10/2012, 03:43 PM
not sendclientmessage i mean to create texdraw on botton of screen LOL i have sendclientmessage

hossa
03/10/2012, 03:47 PM
Dude Look at The on up on it :|
but iam make textdraw for u xD
Please have some patience :D

Beljulji
03/10/2012, 03:48 PM
You want that Text Draw to get seen by everyone in the server?

@.V: My friend he says he wants a TextDraw not a client message ;)

yes i want texdraw to create not clienmessage

Beljulji
03/10/2012, 03:50 PM
Dude Look at The on up on it :|
but iam make textdraw for u xD
Please have some patience :D

what?

hossa
03/10/2012, 03:54 PM
new string[18];
format(string, sizeof(string), "Welcome To /AA ");
GameTextForPlayer(playerid, string, 1000, 0);
return 1;
}

Beljulji
03/10/2012, 03:57 PM
LOOOOOOL NOT GAME TEXT LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL TEXDRAW!!!!!!!!!!! YOU UNDERSTAND???????

gtakillerIV
03/10/2012, 04:02 PM
Put this in under OnGameModeInit()

aatextdraw= TextDrawCreate(320.0, 425.0, "You have teleported to /aa!");


Add this in your /aa command

TextDrawShowForPlayer(playerid,aatextdraw);


Now let's use a Timer to kill our TextDraw shall we?

Under OnGameModeInit()


aatextdrawtimer = SetTimer("aatextdrawkiller", 60000, 0);//This will kill our TextDraw after 1 minute.

Now put this under your defines:

forward aatextdrawkiller();
public aatextdrawkiller()
{
KillTimer(aatextdrawtimer);
return 1;
}


PS: I didin't test it since I have no time to do that.

Beljulji
03/10/2012, 04:04 PM
ok ty

Beljulji
04/10/2012, 12:59 AM
Put this in under OnGameModeInit()

aatextdraw= TextDrawCreate(320.0, 425.0, "You have teleported to /aa!");


Add this in your /aa command

TextDrawShowForPlayer(playerid,aatextdraw);


Now let's use a Timer to kill our TextDraw shall we?

Under OnGameModeInit()


aatextdrawtimer = SetTimer("aatextdrawkiller", 60000, 0);//This will kill our TextDraw after 1 minute.

Now put this under your defines:

forward aatextdrawkiller();
public aatextdrawkiller()
{
KillTimer(aatextdrawtimer);
return 1;
}


PS: I didin't test it since I have no time to do that.
C:\Users\Beljulji\Documents\Samp Server\gamemodes\UltimateStunt.pwn(325) : error 017: undefined symbol "aatextdraw"
C:\Users\Beljulji\Documents\Samp Server\gamemodes\UltimateStunt.pwn(326) : error 017: undefined symbol "aatextdrawtimer"
C:\Users\Beljulji\Documents\Samp Server\gamemodes\UltimateStunt.pwn(7051) : error 017: undefined symbol "aatextdrawtimer"
C:\Users\Beljulji\Documents\Samp Server\gamemodes\UltimateStunt.pwn(9197) : error 017: undefined symbol "aatextdraw"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

SwisherSweet
04/10/2012, 02:54 AM
http://wiki.sa-mp.com/wiki/CreatePlayerTextDraw
Just use this...

newbienoob
04/10/2012, 03:33 AM
@All posters: :picard:

OT: Here

//at the top
new Text:teleporttext; //create a new textdraw variable

//under OnGameModeInit()
teleporttext = TextDrawCreate(10.000000, 428.000000, "Teleports:");
TextDrawBackgroundColor(teleporttext, 65535);
TextDrawFont(teleporttext, 1);
TextDrawLetterSize(teleporttext, 0.450000, 1.500000);
TextDrawColor(teleporttext, 16711935);
TextDrawSetOutline(teleporttext, 1);
TextDrawSetProportional(teleporttext, 1);

//under your /aa command
new str[128],name[24];
GetPlayerName(playerid,name,24);
format(str,sizeof(str),"Teleports: %s has teleported to /aa",name);
TextDrawSetString(teleporttext,str);

Gamer_007
04/10/2012, 04:02 AM
which cmd processor u using

if u using ZCMD then this


CMD:aa(playerid, params[])
{
SetPlayerPos(playerid, 380.5123,2544.0908,21.0001);
GameTextForPlayer(playerid,"Your Message here",3000,3);
return 1;
}

Beljulji
05/10/2012, 01:11 PM
not GameText Or texdraw for player i WANT TEXDRAW TO SHOW FOR ALL PLAYERS WHEN SOMEONE JOIN SOMEWHERE!!!

Beljulji
05/10/2012, 01:16 PM
@All posters: :picard:

OT: Here

//at the top
new Text:teleporttext; //create a new textdraw variable

//under OnGameModeInit()
teleporttext = TextDrawCreate(10.000000, 428.000000, "Teleports:");
TextDrawBackgroundColor(teleporttext, 65535);
TextDrawFont(teleporttext, 1);
TextDrawLetterSize(teleporttext, 0.450000, 1.500000);
TextDrawColor(teleporttext, 16711935);
TextDrawSetOutline(teleporttext, 1);
TextDrawSetProportional(teleporttext, 1);

//under your /aa command
new str[128],name[24];
GetPlayerName(playerid,name,24);
format(str,sizeof(str),"Teleports: %s has teleported to /aa",name);
TextDrawSetString(teleporttext,str);


hmm when i come ingame and type /aa texdraw doesnt showup

Tigerkiller
05/10/2012, 01:21 PM
not GameText Or texdraw for player i WANT TEXDRAW TO SHOW FOR ALL PLAYERS WHEN SOMEONE JOIN SOMEWHERE!!!

Please learn to Script and stop Caps! Omg such kids

Beljulji
05/10/2012, 01:23 PM
LOL im not KID and if you want to help then HELP dont complain!

Tigerkiller
05/10/2012, 01:27 PM
Sry but i only told you, what i think about you and your Caps ? If this isnt't allowed go report me

Beljulji
05/10/2012, 01:30 PM
Caps? what tha hell is Caps? :D

Tigerkiller
05/10/2012, 01:32 PM
This is Caps: "WANT TEXDRAW TO SHOW FOR ALL PLAYERS WHEN SOMEONE JOIN SOMEWHERE!!!"

tsonn1
05/10/2012, 01:33 PM
Caps is THIS. (UpperCase)

Scott Zulkifli
05/10/2012, 02:11 PM
CMD:aa(playerid, params[])
{
SetPlayerPos(playerid, /*HERE position*/);
{
new name[24],ostring[124];
GetPlayerName(playerid,name,sizeof(name));
format(ostring,sizeof(ostring),"%s now joined /aa.",name);
SendClientMessageToAll(0xFFFF00AA,ostring);
}
return 1;
}


like this?

Jarnu
05/10/2012, 02:18 PM
Quoted from Newbienoob

//at the top
new Text:teleporttext; //create a new textdraw variable

//under OnGameModeInit()
teleporttext = TextDrawCreate(10.000000, 428.000000, "Teleports:");
TextDrawBackgroundColor(teleporttext, 65535);
TextDrawFont(teleporttext, 1);
TextDrawLetterSize(teleporttext, 0.450000, 1.500000);
TextDrawColor(teleporttext, 16711935);
TextDrawSetOutline(teleporttext, 1);
TextDrawSetProportional(teleporttext, 1);

//under your /aa command
TextDrawShowForPlayer(playerid, teleporttext);
new str[128],name[24];
GetPlayerName(playerid,name,24);
format(str,sizeof(str),"Teleports: %s has teleported to /aa",name);
TextDrawSetString(teleporttext, str);


You have to show the textdraw too using TextDrawShowForPlayer also . hide it after some seconds by making timer..

CrazyChoco
05/10/2012, 02:31 PM
God, only 2 peoples understand what a textdraw is... Let me ask something to the others, Are you blind?
He clearly says Textdraw, then why you come with gametext or Sendclientmessage, w/e bullshit you know.

And for you Beljulji, that is either not good explained. Very very bad :p

I would have given you the proper answer but this title "Texdraw Help +rep" Totally turned me off, Good Luck!

Gamer_007
05/10/2012, 03:29 PM
hmm when i come ingame and type /aa texdraw doesnt showup

Did u used ShowTextDrawForPlayer(playerid,/*Your textdraw name*/); in cmd aa

Like this
CMD:aa(playerid, params[])
{
SetPlayerPos(playerid, 380.5123,2544.0908,21.0001);
ShowTextDrawForPlayer(playerid,/*Your textdraw name*/);
return 1;
}

Beljulji
06/10/2012, 06:10 AM
oh s**t i forgot to put showtexdraw on /aa command sry. :D

Beljulji
09/10/2012, 09:14 AM
i have problem now when i join /aa i can see texdraw but other players dont!