#define COLOR_GRIS 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_PINK 0xD700D7FF
#define COLOR_AVERDE 0x06B0B9FF
#define COLOR_ROJO 0xC40000FF
#define COLOR_OBSCURO 0x996848FF
#define COLOR_FEO 0x808000FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_CAFE 0x996848FF
public OnPlayerRequestClass(playerid, classid)
{
iSpawnSet[playerid] = 0;
SetupPlayerForClassSelection(playerid);
PlayerPlaySound(playerid, 1097, -1370.2362,-256.3250,14.1440); //sonido
SetupPlayerForClassSelection(playerid); //
new skin = GetPlayerSkin(playerid);
ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1); //animacion de bailar si te gusta
switch (skin)
{
case 105,106,107,269,270,271,207:
{
GameTextForPlayer(playerid, "~g~GROVE",1000,3);//Texto que aparecera al Seleccionar el team_mex al escojer skin
gTeam[playerid] = TEAM_GROVE;
}
case 102,103,104,64:
{
GameTextForPlayer(playerid, "~p~BALLAS",1000,3);//Texto que aparecera al Seleccionar el team_arg al escojer skin
gTeam[playerid] = TEAM_BALLAS;
}
case 108,109,110,63: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~y~VAGOS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_VAGOS;
}
case 114,115,116,41: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~b~AZTECAS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_AZTECAS;
}
case 176,177,241,143,156,211: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~B~BARBEROS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_BARBEROS;
}
case 260,221,27,23,242,192: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~r~CIVILES",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_CIVILES;
}
case 265,266,267,285,294,122,163,299,90,214: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~s~INTERPOL",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_INTERPOL;
}
case 111,112,127,249,272,169: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~brown~MAFIA",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_MAFIA;
}
case 78,134,135,230,213,77: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~~BASUREROS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_BASUREROS;
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
iSpawnSet[playerid] = 0;
SetupPlayerForClassSelection(playerid);
PlayerPlaySound(playerid, 1097, -1370.2362,-256.3250,14.1440); //sonido
SetupPlayerForClassSelection(playerid); //
new skin = GetPlayerSkin(playerid);
ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1); //animacion de bailar si te gusta
switch (skin)
{
case 105,106,107,269,270,271,207:
{
GameTextForPlayer(playerid, "~g~GROVE",1000,3);//Texto que aparecera al Seleccionar el team_mex al escojer skin
gTeam[playerid] = TEAM_GROVE;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 102,103,104,64:
{
GameTextForPlayer(playerid, "~p~BALLAS",1000,3);//Texto que aparecera al Seleccionar el team_arg al escojer skin
gTeam[playerid] = TEAM_BALLAS;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 108,109,110,63: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~y~VAGOS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_VAGOS;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 114,115,116,41: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~b~AZTECAS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_AZTECAS;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 176,177,241,143,156,211: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~B~BARBEROS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_BARBEROS;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 260,221,27,23,242,192: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~r~CIVILES",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_CIVILES;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 265,266,267,285,294,122,163,299,90,214: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~s~INTERPOL",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_INTERPOL;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 111,112,127,249,272,169: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~brown~MAFIA",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_MAFIA;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
case 78,134,135,230,213,77: //y asi asta completar todos los skines
{
GameTextForPlayer(playerid, "~~BASUREROS",1000,3);//Texto que aparecera al Seleccionar el team_usa al escojer skin
gTeam[playerid] = TEAM_BASUREROS;
SetPlayerColor(playerid, COLOR_sdasda);//cambia el nombre del color
}
}
return 1;
}
No puedes poner los colores que quieras en GameTextForPlayer, tienes que usar lo que ya estбn predefinidos (~r~ por ejemplo). Si quieres usar colores el los textos, tienes que crear un textdraw.
|
y una pregunta mas como puedo hacer para que en el chat aparesca su id y su nombre gracias
|
if(IsPlayerConnected(playerid))
{
new
string[128];
format(string, sizeof(string),"[%d]: %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new cmd[256];
new giveplayerid, moneys, idx;
if(IsPlayerConnected(playerid))
{
new
string[128];
format(string, sizeof(string),"[%d]: %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
return 0;
}
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(155) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(157) : error 017: undefined symbol "text"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.