Name off won't work... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Name off won't work... (
/showthread.php?tid=76898)
Name off won't work... -
killerx100 - 07.05.2009
pawn Код:
//TOP of script
forward NameOff(playerid);
forward NameOn(playerid);
public NameOff(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(playerid,i, false);
return 1;
}
public NameOn(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(playerid,i,true);
return 1;
}
if(strcmp(cmd,"/name",true)==0)
{
if(IsPlayerConnected(playerid))
{
new x_job[256];
x_job = strtok(cmdtext, idx);
if(!strlen(x_job)) {
SendClientMessage(playerid,COLOR_WHITE,"USAGE: /name ON/OFF");
return 1;
}
if(strcmp(x_job,"off",true) == 0)
{
NameOff(playerid);
PlayerInfo[playerid][pTags] = 1;
SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been hidden.");
GameTextForPlayer(playerid, "~r~Showname off", 600, 1);
}
else if(strcmp(x_job,"on",true) == 0)
{
NameOn(playerid);
PlayerInfo[playerid][pTags] = 0;
SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been unhidden.");
GameTextForPlayer(playerid, "~r~Showname on", 600, 1);
}
}
return 1;
}
Why name tag dissapeard only for a second ?
Re: Name off won't work... -
miokie - 07.05.2009
Quote:
|
Originally Posted by killerx100
pawn Код:
//TOP of script forward NameOff(playerid); forward NameOn(playerid);
public NameOff(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i,playerid, false); return 1; } public NameOn(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i,playerid,true); return 1; }
if(strcmp(cmd,"/name",true)==0) { if(IsPlayerConnected(playerid)) { new x_job[256]; x_job = strtok(cmdtext, idx); if(!strlen(x_job)) { SendClientMessage(playerid,COLOR_WHITE,"USAGE: /name ON/OFF"); return 1; }
if(strcmp(x_job,"off",true) == 0) { NameOff(playerid); PlayerInfo[playerid][pTags] = 1; SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been hidden."); GameTextForPlayer(playerid, "~r~Showname off", 600, 1); } else if(strcmp(x_job,"on",true) == 0) { NameOn(playerid); PlayerInfo[playerid][pTags] = 0; SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been unhidden."); GameTextForPlayer(playerid, "~r~Showname on", 600, 1); } } return 1; }
Why name tag dissapeard only for a second ?
|
Re: Name off won't work... -
killerx100 - 07.05.2009
wtf?
Re: Name off won't work... -
*ToM* - 07.05.2009
Quote:
|
Originally Posted by Miokie*
Quote:
|
Originally Posted by killerx100
pawn Код:
//TOP of script forward NameOff(playerid); forward NameOn(playerid);
public NameOff(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i,playerid, false); return 1; } public NameOn(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i,playerid,true); return 1; }
if(strcmp(cmd,"/name",true)==0) { if(IsPlayerConnected(playerid)) { new x_job[256]; x_job = strtok(cmdtext, idx); if(!strlen(x_job)) { SendClientMessage(playerid,COLOR_WHITE,"USAGE: /name ON/OFF"); return 1; }
if(strcmp(x_job,"off",true) == 0) { NameOff(playerid); PlayerInfo[playerid][pTags] = 1; SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been hidden."); GameTextForPlayer(playerid, "~r~Showname off", 600, 1); } else if(strcmp(x_job,"on",true) == 0) { NameOn(playerid); PlayerInfo[playerid][pTags] = 0; SendClientMessage(playerid,COLOR_LIGHTRED,"[Name] Your name tag has been unhidden."); GameTextForPlayer(playerid, "~r~Showname on", 600, 1); } } return 1; }
Why name tag dissapeard only for a second ?
|

|
Re: Name off won't work... -
HB - 07.05.2009
Quote:
|
Originally Posted by killerx100
wtf?
|
He changed something on the code, try the code miokie gave you.
Re: Name off won't work... -
killerx100 - 07.05.2009
Quote:
|
Originally Posted by иєσz
Quote:
|
Originally Posted by killerx100
wtf?
|
He changed something on the code, try the code miokie gave you.
|
I tried lol but won't work..