#1

I Know I have Asked much in 1 hours
and im stressing you but im learning

This is Code :

Код:
new bool:smscheck[MAX_PLAYERS];
new smstarget;
CMD:t(playerid, params[])
{

	new id, str1[128], str2[128], name[MAX_PLAYER_NAME], pname, message;
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	if(sscanf(params, "us", id, message)) return SCM(playerid, -1, "USAGE:/t[playerid][message].");
	format(str1, sizeof(str1), "%s:%s", name, message);
	format(str2, sizeof(str2), "You:%s", message);
	SCM(id, 0xecf720FF, str1);
	SCM(playerid, 0xecf720FF, str2);
	playerid=smstarget;
	smscheck[id]=true;
	return 1;

}
We have :
Mark[1]:/t 0 Hey
Sara[0]: " :Hey"
(instead of name):Hey
Wish Yo got it
Reply
#2

I see no mistakes but this:
playerid = smstarget;
makes no sense i think you meant:
smstarget = playerid;
so change it to that and try.
Reply
#3

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
I see no mistakes but this:
playerid = smstarget;
makes no sense i think you meant:
smstarget = playerid;
so change it to that and try.
LOL yes You Know what i mean ..
i replace but still same..
Reply
#4

I Surprised why ...
Reply
#5

I never used
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
but since the name is returning blank try changing that to
GetPlayerName(playerid, name, sizeof(name));
if it doesn't work then wait for someone else to answer cuz that's all i got, ALSO about that UF.INC on ur other post i can't find it anywhere its like 7 years old so yeah...
Reply
#6

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
I never used
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
but since the name is returning blank try changing that to
GetPlayerName(playerid, name, sizeof(name));
if it doesn't work then wait for someone else to answer cuz that's all i got, ALSO about that UF.INC on ur other post i can't find it anywhere its like 7 years old so yeah...
Thanks mate i lv u i cant give you rep twice i Gived u yesterday
Reply
#7

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
I never used
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
but since the name is returning blank try changing that to
GetPlayerName(playerid, name, sizeof(name));
if it doesn't work then wait for someone else to answer cuz that's all i got, ALSO about that UF.INC on ur other post i can't find it anywhere its like 7 years old so yeah...
I've fixed it , it should be like this
Код:
new bool:smscheck[MAX_PLAYERS];
new smstarget;
CMD:t(playerid, params[])
{

	new id, str1[128], str2[128], message;
	new name[MAX_PLAYER_NAME];
	if(sscanf(params, "us", id, message)) return SCM(playerid, -1, "USAGE:/t[playerid][message].");            
	GetPlayerName(playerid, name, sizeof(name));

	format(str1, sizeof(str1), "%s:%s", name, message);
	format(str2, sizeof(str2), "You:%s", message);
	SCM(id, 0xecf720FF, str1);
	SCM(playerid, 0xecf720FF, str2);
	smstarget=playerid;
	smscheck[id]=true;
	return 1;

}

instead of this .
Код:
new bool:smscheck[MAX_PLAYERS];
new smstarget;
CMD:t(playerid, params[])
{

	new id, str1[128], str2[128], name[MAX_PLAYER_NAME], pname, message;
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	if(sscanf(params, "us", id, message)) return SCM(playerid, -1, "USAGE:/t[playerid][message].");
	format(str1, sizeof(str1), "%s:%s", name, message);
	format(str2, sizeof(str2), "You:%s", message);
	SCM(id, 0xecf720FF, str1);
	SCM(playerid, 0xecf720FF, str2);
	playerid=smstarget;
	smscheck[id]=true;
	return 1;

}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)