Need Little help in /rpname -
IceBilizard - 16.11.2012
Guyz i made 2 commands 1 /rpname 2. /rname for remove rpname
/rpname works good but /rname didnt works please help me and fix cmd
1- /rpname code
pawn Код:
CMD:rpname(playerid, params[])
{
#pragma unused params
new text[50];
new string[100];
new rpnametext[MAX_PLAYERS];
if (sscanf(params,"s[50]",text))return SendClientMessage(playerid, -1, "USAGE : /rpname [name]");
else
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
rpnametext[playerid] = Create3DTextLabel(text, COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(rpnametext[playerid],playerid, 0.0, 0.0, 0.7);
format(string,sizeof(string),"You have set your Roleplay name to:\t{FF9900}%s", text);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
2- /rname
pawn Код:
CMD:rname(playerid, params[])
{
#pragma unused params
new string[70];
new rpnametext[MAX_PLAYERS];
Delete3DTextLabel(rpnametext[playerid]);
format(string,sizeof(string),"You have remove your Roleplay name.");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if i using /rname but rpname didnt removes
Re: Need Little help in /rpname -
Riddick94 - 16.11.2012
Could you show, the COLOR_WHITE macro, please? Because if you're using colour white then your nick will be not visible.
AW: Need Little help in /rpname -
Skimmer - 16.11.2012
pawn Код:
format(string,sizeof(string),"You have remove your Roleplay name.");
SendClientMessage(playerid, COLOR_WHITE, string);
I don't know why you use
format here, if you won't format anything.
@Riddick94 he means /rpname works fine but /rname not
Quote:
/rpname works good but /rname didnt works please help me and fix cmd
|
@IceBilizard you used
Text3D for the variable
rpnametext[playerid] right?
pawn Код:
new Text3D:rpnametext[MAX_PLAYERS]; // Top of the script
Re: Need Little help in /rpname -
IceBilizard - 16.11.2012
yeap
Re: Need Little help in /rpname -
[HK]Ryder[AN] - 16.11.2012
Quote:
Originally Posted by MouseBreaker
pawn Код:
format(string,sizeof(string),"You have remove your Roleplay name."); SendClientMessage(playerid, COLOR_WHITE, string);
I don't know why you use format here, if you won't format anything.
@Riddick94 he means /rpname works fine but /rname not
@IceBilizard you used Text3D for the variable rpnametext[playerid] right?
pawn Код:
new Text3D:rpnametext[MAX_PLAYERS]; // Top of the script
|
Quote:
Originally Posted by IceBilizard
yeap
|
You said you have created a global variable on the top of your script. why are you creating a "new rpnametext" in the command?
Re: Need Little help in /rpname -
IceBilizard - 16.11.2012
Thanks MouseBreaker
i just remove
pawn Код:
new rpnametext[MAX_PLAYERS];
from the code
and put
this on top of script and /rname works perfect thank you
pawn Код:
new Text3D:rpnametext[MAX_PLAYERS]; // Top of the script