Uninvisible Command - 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: Uninvisible Command (
/showthread.php?tid=276396)
Uninvisible Command -
Join7 - 13.08.2011
On this command /invisible can you do /uninvisible
this command is /invisible:
Код:
#define COLOR_INVISIBLE 0xFFFFFF00
if(strcmp(cmd,"/invisible",true) == 0)
{
SetPlayerColor(playerid,COLOR_INVISIBLE);
SendClientMessage(playerid,COLOR_WHITE,"You are invisibie!");
return 1;
}
Re: Uninvisible Command -
iPLEOMAX - 13.08.2011
pawn Код:
#define COLOR_VISIBLE 0xFFFFFFFF
if(strcmp(cmd,"/visible",true) == 0)
{
SetPlayerColor(playerid,COLOR_VISIBLE);
SendClientMessage(playerid,COLOR_WHITE,"You are visible!");
return 1;
}
Re: Uninvisible Command -
MadeMan - 13.08.2011
pawn Код:
if(strcmp(cmd,"/invisible",true) == 0)
{
SetPlayerColor(playerid, GetPlayerColor(playerid) & 0xFFFFFF00);
SendClientMessage(playerid,COLOR_WHITE,"You are invisibie!");
return 1;
}
if(strcmp(cmd,"/uninvisible",true) == 0)
{
SetPlayerColor(playerid, GetPlayerColor(playerid) | 0xFF);
SendClientMessage(playerid,COLOR_WHITE,"You are uninvisibie!");
return 1;
}
Re: Uninvisible Command -
Tigerkiller - 13.08.2011
mademan did your cmd work ?
Re: Uninvisible Command -
Join7 - 13.08.2011
Not working, mademan
Re: Uninvisible Command -
Riddick94 - 13.08.2011
Here's a way how to make this command:
pawn Код:
new PlayerColour[MAX_PLAYERS];
if(strcmp(cmd, "/invisible", true) == 0)
{
PlayerColour[playerid] = GetPlayerColor(playerid);
SetPlayerColor(playerid, 0xFFFFFFFF);
SendClientMessage(playerid, COLOR_WHITE, "You are invisibie!");
return 1;
}
if(strcmp(cmd, "/uninvisible", true) == 0)
{
SetPlayerColor(playerid, PlayerColour[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"You are uninvisibie!");
return 1;
}
Re: Uninvisible Command -
Join7 - 13.08.2011
Код:
D:\Games\Server\gamemodes\drift.pwn(9118) : error 017: undefined symbol "PlayerColour"
D:\Games\Server\gamemodes\drift.pwn(9118) : warning 215: expression has no effect
D:\Games\Server\gamemodes\drift.pwn(9118) : error 001: expected token: ";", but found "]"
D:\Games\Server\gamemodes\drift.pwn(9118) : error 029: invalid expression, assumed zero
D:\Games\Server\gamemodes\drift.pwn(9118) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
9118 line - PlayerColour[playerid] = GetPlayerColor(playerid);
EDIT: Is compiled, I forgot "new ..."
Re: Uninvisible Command -
Tigerkiller - 13.08.2011
if a player near a other is he able to see his name?
Re: Uninvisible Command -
Riddick94 - 13.08.2011
Where did you put PlayerColour[playerid]? put this of the top of your script.
Re: Uninvisible Command -
Join7 - 13.08.2011
Is compiled, I forgot "new ..."
EDIT: Thanks bro