Uninvisible Command
#1

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;
}
Reply
#2

pawn Код:
#define COLOR_VISIBLE 0xFFFFFFFF

if(strcmp(cmd,"/visible",true) == 0)
{
    SetPlayerColor(playerid,COLOR_VISIBLE);
    SendClientMessage(playerid,COLOR_WHITE,"You are visible!");
    return 1;
}
Reply
#3

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;
}
Reply
#4

mademan did your cmd work ?
Reply
#5

Not working, mademan
Reply
#6

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;
}
Reply
#7

Код:
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 ..."
Reply
#8

if a player near a other is he able to see his name?
Reply
#9

Where did you put PlayerColour[playerid]? put this of the top of your script.
Reply
#10

Is compiled, I forgot "new ..."

EDIT: Thanks bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)