01.03.2008, 11:02
script to
[PTZ] IS COLOR ORENGE
[] COLOR IS RED
ETC..
thenks
[PTZ] IS COLOR ORENGE
[] COLOR IS RED
ETC..
thenks
if(strcmp(cmd, "/changecolor", true) == 0) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_LIGHTRED, "COLORS: /red - this makes your name color red"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "COLORS: /lightblue - this makes your name color light blue") SendClientMessage(playerid, COLOR_DBLUE, "COLORS: /darkblue - this makes your name color dark blue") SendClientMessage(playerid, COLOR_WHITE, "COLORS: /white - this makes your name color white") SendClientMessage(playerid, COLOR_YELLOW, "COLORS: /yellow - this makes your name color yellow") SendClientMessage(playerid, COLOR_GREEN, "COLORS: /green - this makes your name color green") SendClientMessage(playerid, TEAM_BALLAS_COLOR, "COLORS: /purple - this makes your name color purple") } return 1; } if(strcmp(cmd, "/red", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_LIGHTRED); SendClientMessage(playerid, COLOR_LIGHTRED, "Your name color has been successfully changed to red"); } return 1; } if(strcmp(cmd, "/lightblue", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_LIGHTBLUE); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your name color has been successfully changed to light blue"); } return 1; } if(strcmp(cmd, "/darkblue", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_DBLUE); SendClientMessage(playerid, COLOR_DBLUE, "Your name color has been successfully changed to dark blue"); } return 1; } if(strcmp(cmd, "/white", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_WHITE); SendClientMessage(playerid, COLOR_WHITE, "Your name color has been successfully changed to white"); } return 1; } if(strcmp(cmd, "/yellow", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_YELLOW); SendClientMessage(playerid, COLOR_YELLOW, "Your name color has been successfully changed to yellow"); } return 1; } if(strcmp(cmd, "/green", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_GREEN); SendClientMessage(playerid, COLOR_GREEN, "Your name color has been successfully changed to green"); } return 1; } if(strcmp(cmd, "/purple", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, TEAM_BALLAS_COLOR); SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Your name color has been successfully changed to purple"); } return 1; }
#define COLOR_GREEN 0x33AA33AA #define TEAM_BALLAS_COLOR 0xD900D3C8 #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFFF #define COLOR_DBLUE 0x2641FEAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_LIGHTRED 0xFF6347AA
#include <a_samp>
#define MaxTags 5
new PlayerTags[MaxTags][] = {
"[TAG1]",
"[TAG2]",
"[TAG3]",
"[TAG4]",
"[TAG5]"
};
new PlayerColors[MaxTags] = {
0xE60000FF,
0x1229FAFF,
0x21DD00FF,
0xFFFF00FF,
0xF97804FF
};
main()
{
}
public OnPlayerConnect(playerid)
{
new pName[30];
GetPlayerName(playerid, pName, sizeof pName);
for(new i = 0; i < MaxTags; i++)
{
if(strfind(pName, PlayerTags[i], false) != -1)
{
switch(i)
{
default:
{
SetPlayerColor(playerid, PlayerColors[i]);
break;
}
}
}
}
}