[Pomoc] /Family

Započeo MicroSD_, Januar 26, 2011, 22:43:28 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

if(strcmp(cmd, "/family", true) == 0 || strcmp(cmd, "/f", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
   if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/f)amily [family chat]");
return 1;
}
if (gTeam[playerid] >= 5 || PlayerInfo[playerid][pFMember] < 255)
{
   new leader = PlayerInfo[playerid][pLeader];
   new member = PlayerInfo[playerid][pMember];
   if(member==5||member==6)
   {
       if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Godfather %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Underboss %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Capo %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Soldier %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Associate %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Outsider %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Outsider %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==8)
{
   if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Vice-Director %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Agent %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Marksman %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Freelancer %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Freelancer %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==9)
{
   if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Producent %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Network Editor %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Network Anchor %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Local Editor %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Local Reporter %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Intern %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Intern %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==10)
{
   if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Taxi Company Owner %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Shift Supervisor %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Dispatcher %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Cabbie %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Taxi Rookie %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Trainee %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Trainee %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==11)
{
   if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Boss %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Under Boss %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Manager %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Senior Instructor %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Instructor %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Trainee %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Trainee %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(leader==5||leader==6)
{
   format(string, sizeof(string), "** Godfather %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}
else if(leader==8)
{
   format(string, sizeof(string), "** Director %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}
else if(leader==9)
{
   format(string, sizeof(string), "** Network Producer %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}
else if(leader==10)
{
   format(string, sizeof(string), "** Taxi Company Owner %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}
else if(leader==11)
{
   format(string, sizeof(string), "** Boss %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pFMember] < 255)
   {
       if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Godfather %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Underboss %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Capo %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Soldier %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Associate %s: %s. ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Outsider %s: %s. ))  **", sendername, result); }
else { format(string, sizeof(string), "** Outsider %s: %s. )) **", sendername, result); }
SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
}
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   you are not part of a Family!");
return 1;
}
}//not connected
return 1;
}


Imam komandu /f /family, kako da promijenim boju chata.... pokusavao sam razne nacine, ali dodu mi errori...

Boje sam gledao s ove liste http://www.free-webmaster-tools.com/colorpicker.htm ... i da li mi moze netko objasniti...
Poslednja Izmena: Januar 26, 2011, 23:03:13 POSLE PODNE od [Saw]BloodMaster

ZicMortal

SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);


Podebljano ti je ime boje (tj. definirano ime koda koji spada u tu boju).

Primjer:

#define COLOR_WHITE 0xFFFFFFFF

Svugdje gdje pise COLOR_WHITE pawno ce ga zamjeniti sa 0xFFFFFFFF koji obiljezava bijelu boju.

I mislim da boje nemozes pronalaziti u color pickeru >.<

Citat: ZicMortal poslato Januar 26, 2011, 22:47:54 POSLE PODNE
I mislim da boje nemozes pronalaziti u color pickeru >.<[/color]

Mos, ali na kraju moras dodat prozirnost... AA

Na pickeru je vako: #FF8C00, e sad ti to zamjenis sa 0xFF8C00AA

AA - Neprozirno..

Ugl, nabolje ti je sam raditi boje, to ti je na RGB systemu..

0xRRGGBBPP

a ja bi to najradje ovako(nekako je preglednije):

Netko %s: {FFFFFF} %s

Ty, ovo "netko ime" ce pisati u boji, a chat ce pisati bijelo, to je npva 0.3c funckija..

BTW. Zic ti je dao odgovor, a ja samo nekoliko savjeta :)
Poslednja Izmena: Januar 26, 2011, 23:03:40 POSLE PODNE od [Saw]BloodMaster

black_dota

http://colorpickersamp.codeplex.com/

Taj cu i ja sad skinuti jer imam neku staru verziju

Ova je bolja

Citat: [Saw]BloodMaster poslato Januar 26, 2011, 23:02:52 POSLE PODNE
Citat: ZicMortal poslato Januar 26, 2011, 22:47:54 POSLE PODNE
I mislim da boje nemozes pronalaziti u color pickeru >.<[/color]

Mos, ali na kraju moras dodat prozirnost... AA

Na pickeru je vako: #FF8C00, e sad ti to zamjenis sa 0xFF8C00AA

AA - Neprozirno..

Ugl, nabolje ti je sam raditi boje, to ti je na RGB systemu..

0xRRGGBBPP

a ja bi to najradje ovako(nekako je preglednije):

Netko %s: {FFFFFF} %s

Ty, ovo "netko ime" ce pisati u boji, a chat ce pisati bijelo, to je npva 0.3c funckija..

BTW. Zic ti je dao odgovor, a ja samo nekoliko savjeta :)

samo jos da te pitam <3

kada hocu tu novu inovaciju ubacit, gdje mogu vidjeti te boje sto si ti stavio... {FFFFFF}

I to stavim u onaj red ispred " rezultata " gdje zelim tu boju ?

valjda si me skonto sta sam htio reci..