19.07.2011, 18:51
I have made some answers from the NPC bot when typing some particular words in a line
But the answers appears over the players words like the NPC already known what he was going to type.
Example:
if type /lifterman
i got this
Answer:
lifterman: What do you want Cruising?
Cruising: lifterman
It should be:
Cruising: lifterman
lifterman: What do you want Cruising?
any way to fix that? or is it just that way it is?
Code:
But the answers appears over the players words like the NPC already known what he was going to type.
Example:
if type /lifterman
i got this
Answer:
lifterman: What do you want Cruising?
Cruising: lifterman
It should be:
Cruising: lifterman
lifterman: What do you want Cruising?
any way to fix that? or is it just that way it is?
Code:
pawn Код:
public OnPlayerText(playerid, text[])
{
if (strfind(text, "lifterman") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "lifterman: What do you want %s?", name);
SendClientMessageToAll(0xFFFFFFFF, string);
}
else if (strfind(text, "who are you?") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "lifterman: I am your worst nightmare!", name);
SendClientMessageToAll(0xFFFFFFFF, string);
}
else if (strfind(text, "fuck you") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"lifterman: You talking to me %s? or did you just got owned? haha", name);
SendClientMessageToAll(0xFFFFFFFF, string);
}
return 1;
}