How would i do this - 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)
+--- Thread: How would i do this (
/showthread.php?tid=331144)
How would i do this -
Scripter12345 - 03.04.2012
How would i make it so when i do a command like /adminduty my name would change and the colour of it would change
Please Help Please
Re: How would i do this -
Jack.7331 - 03.04.2012
SetPlayerName(playerid,
SetPlayerColor(playerid,
Re: How would i do this -
2KY - 03.04.2012
pawn Код:
new
bool:IsOnAdminDuty [ MAX_PLAYERS ] = false;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/adminduty", cmdtext, true, 10) == 0)
{
if( IsPlayerAdmin( playerid ) ) //Replace this with your admin variable (PlayerInfo [ playerid ] [ pAdmin])?
{
if( IsOnAdminDuty [ playerid ] == false )
{
IsOnAdminDuty [ playerid ] = true;
SetPlayerColor( playerid, 0xFF0000FF ); //Replace this with the administrator colour.
}
else
{
IsOnAdminDuty [ playerid ] = false;
SetPlayerColor( playerid, 0xFFFFFFFF ); //Reset them to their normal colour!
}
}
else return SendClientMessage( playerid, -1, "[ERROR] You're not an Administrator!" );
return 1;
}
return 0;
}