12.03.2011, 21:29
First i need help about departments. But when i go in game and make me leader on org 11 and try /d or /departments nothing happen :S
I add:
Command:
And other thing i want to change this to other check picture.
I want to change it to that two which color is red and yellow.
Thats all really fast i need this..
I add:
pawn Код:
else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** CIA.Marsal %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** CIA.Direktor %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** CIA.Trener %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** CIA.Spion %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** CIA.Agent %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** CIA.Spec %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** CIA.Spec %s: %s, over. **", sendername, result);
}
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
pawn Код:
//----------------------------------[departments]-----------------------------------------------
if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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, "Koriscenje: (/d)epartments [department chat]");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** Deputy Chief %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Corporal %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Police Officer %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result);
}
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
}
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Gen.Major %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Major %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Kapetan %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Vodnik %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Vojnik %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result);
}
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** CIA.Marsal %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** CIA.Direktor %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** CIA.Trener %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** CIA.Spion %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** CIA.Agent %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** CIA.Spec %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** CIA.Spec %s: %s, over. **", sendername, result);
}
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
{
format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else if(PlayerInfo[playerid][pLeader] == 7||PlayerInfo[playerid][pMember] == 7)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Mayor %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Mayor's bodyguard %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Mayor's driver %s: %s, over. **", sendername, result); }
else { SendClientMessage(playerid, COLOR_GREY, " Mayor hasn't given you a radio to speak in"); return 1; }
SendTeamMessage(2, COLOR_ALLDEPT, string);
SendTeamMessage(1, COLOR_ALLDEPT, string);
SendFamilyMessage(7, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Niste clan Tima !");
return 1;
}
}
return 1;
}
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
format(string, sizeof(string), "~g~Owner~n~~w~%s~n~%d Level",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
}
else
{
format(string, sizeof(string), "~g~Owner~n~~w~%s~n~Rent: $%d Level: %d~n~~y~(/rentroom)",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
else
{
format(string, sizeof(string), "~g~FOR SALE~n~~w~%s~n~$%d~n~%d Level~n~~y~(/buyhouse)",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
}
I want to change it to that two which color is red and yellow.
Thats all really fast i need this..