Posts: 80
Threads: 30
Joined: Oct 2009
Reputation:
0
how do i make it so when i type a command, say i type /help a textdraw would come up and say "hi" just under the sa-mp chat. how do i make it when i type another command like rules it would replace the "hi" with "hello"
Thanks
Posts: 132
Threads: 52
Joined: Mar 2009
First... you'lll need the coords for the textdraw to go under the sa-mp chat, and then for the textdraw replacing the "hi" you'll need a timer for that.
go on :
https://sampwiki.blast.hk/wiki/TextDrawCreate
and :
https://sampwiki.blast.hk/wiki/SetTimer
It would really help you.. because im guessing you're a beginner.
Posts: 80
Threads: 30
Joined: Oct 2009
Reputation:
0
I have the coords i have the textdraw made but what do i add to make it replace "hi" with "hello"?
Posts: 80
Threads: 30
Joined: Oct 2009
Reputation:
0
Then say i type /help and it comes up with a textdraw that says "Hi Sampiscool123, how are you?" how would i make it say "I am fine thank you" when i type /rules?
Posts: 80
Threads: 30
Joined: Oct 2009
Reputation:
0
error 017: undefined symbol "himessage"
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
error 017: undefined symbol "himessage"
error 017: undefined symbol "himessage"
Posts: 602
Threads: 3
Joined: Jun 2009
Reputation:
0
Didn't read it carefully enough, or you would have used the definition.
new Text:himessage;
public OnGameModeInit()
{
himessage = TextDrawCreate(1.0, 5.6, "Hi, how are you?");
return 1;
}
public OnPlayerConnect(playerid)
{
new newtext[41];
format(newtext, sizeof(newtext), "Hi %s, how are you?", GetPlayerName(playerid));
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);
return 1;
}