13.07.2017, 20:53
Took me less than a minute to write that, you can edit and expand on this one, if you want to-
Here you go;
Here you go;
pawn Код:
bool:BadgeStatus[MAX_PLAYERS char],
public OnPlayerConnect(playerid)
{
BadgeStatus{playerid} = false;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/mycommand", cmdtext, true, 10) == 0)
{
if(BadgeStatus{playerid})
{
SendClientMessage(playerid, -1, "You've hidden your badge.");
SetPlayerColor(playerid, COLORWHENBADGEISHIDDEN);
BadgeStatus{playerid} = false;
}
else
{
SendClientMessage(playerid, -1, "You've brought your badge back!");
SetPlayerColor(playerid, COLORWHENBADGEISON);
BadgeStatus{playerid} = true;
}
return 1;
}
return 0;
}