[Pomoc]/gov

Započeo caupton, April 02, 2011, 22:17:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim:FactionGame Edit
Detaljan opis problema:Ovako imam pitanje kako da namestim da kada PD,FBI,Gradonacelnik kada pisu /gov da se taj gov ocrtava na srediti ekrana ili dole u desnom uglu..Ako mi moze neko napraviti..bio bi mu zahvalan
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Code:
if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if(gTeam[playerid] != 2)
         {
             if(PlayerInfo[playerid][pLeader] != 7)
             {
                SendClientMessage(playerid, COLOR_GREY, "   Vi niste policajac !");
                return 1;
            }
         }
         if(PlayerInfo[playerid][pRank] < 6)
         {
             SendClientMessage(playerid, COLOR_GREY, "   Morate biti rank 6 da bi ste koristili ovo !");
             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, "KORISTI: (/gov)ernment [text]");
            return 1;
         }
         SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|");
         if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
         {
            if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
             else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
             else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
            SendClientMessageToAll(COLOR_BLUE, string);
         }
         else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
         {
            format(string, sizeof(string), "Agent %s: %s", sendername, result);
            SendClientMessageToAll(COLOR_GRAD2, string);
         }
         else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
         {
            format(string, sizeof(string), "Soldier %s: %s", sendername, result);
            SendClientMessageToAll(COLOR_GREEN, string);
         }
         else if(PlayerInfo[playerid][pLeader] == 7)
         {
            format(string, sizeof(string), "Mayor %s: %s", sendername, result);
            SendClientMessageToAll(COLOR_GREY, string);
         }
      }
      return 1;
   }
   
   
Poslednja Izmena: April 02, 2011, 22:19:58 POSLE PODNE od Nikola_Hawks

napravi sa  GameTextForAll ili sa TextDrawom

Pr.

ovo
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|");
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           SendClientMessageToAll(COLOR_BLUE, string);
        }


»» ovako
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|"); // mozes i ovo ubacit u donji GameText
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           GameTextForAll(string, 5000, 5);//SendClientMessageToAll(COLOR_BLUE, string);
           // 5000 = vrijeme koliko ce dugo bit prikazan game text (1000 = 1 sec) :D
           // 5 = izgled texta - http://wiki.sa-mp.com/wiki/GameTextStyle (objasnjenje)
        }


a mozes i sa textdraw-om
for(new i = 0; i < MAX_PLAYERS; i++) // loop - http://wiki.sa-mp.com/wiki/Loop (objasnjenje)
pa onda

TextDrawSetString[ime_textdrawa[i],"Text";

Poslednja Izmena: April 02, 2011, 22:48:39 POSLE PODNE od K4Я!K3

Citat: K4Я!K3 poslato April 02, 2011, 22:46:13 POSLE PODNE
napravi sa  GameTextForAll ili sa TextDrawom

Pr.

ovo
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|");
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           SendClientMessageToAll(COLOR_BLUE, string);
        }


»» ovako
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|"); // mozes i ovo ubacit u donji GameText
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           GameTextForAll(string, 5000, 5);//SendClientMessageToAll(COLOR_BLUE, string);
           // 5000 = vrijeme koliko ce dugo bit prikazan game text
           // 5 = izgled texta - http://wiki.sa-mp.com/wiki/GameTextStyle (objasnjenje)
        }


a mozes i sa textdraw-om
for(new i = 0; i < MAX_PLAYERS; i++) // loop - http://wiki.sa-mp.com/wiki/Loop (objasnjenje)
pa onda

TextDrawSetString[ime_textdrawa[i],"Text";



Nista mi nije jasno..OVDE MOZE LOCK NEMOGU DA SE SNADJEM  :'(

Citat: Nikola_Hawks poslato April 02, 2011, 22:47:36 POSLE PODNE
Citat: K4Я!K3 poslato April 02, 2011, 22:46:13 POSLE PODNE
napravi sa  GameTextForAll ili sa TextDrawom

Pr.

ovo
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|");
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           SendClientMessageToAll(COLOR_BLUE, string);
        }


»» ovako
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vesti ___________|"); // mozes i ovo ubacit u donji GameText
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
           if(PlayerInfo[playerid][pRank] == Cool { format(string, sizeof(string), "Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "Captain %s: %s", sendername, result); }
           GameTextForAll(string, 5000, 5);//SendClientMessageToAll(COLOR_BLUE, string);
           // 5000 = vrijeme koliko ce dugo bit prikazan game text
           // 5 = izgled texta - http://wiki.sa-mp.com/wiki/GameTextStyle (objasnjenje)
        }


a mozes i sa textdraw-om
for(new i = 0; i < MAX_PLAYERS; i++) // loop - http://wiki.sa-mp.com/wiki/Loop (objasnjenje)
pa onda

TextDrawSetString[ime_textdrawa[i],"Text";



Nista mi nije jasno..OVDE MOZE LOCK NEMOGU DA SE SNADJEM  :'(
Kani se SKriptanja,pocni se baviti necim Drugim onda  ;)