[POMOC] 2 problema

Započeo [CH]Ivan_Lukic, Mart 20, 2011, 13:51:31 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

1. Prvi problem

Skripta koju koristim:Gta:Rp
Detaljan opis problema: chat od gamemastera ocu stavit da kad si admin mozes pisat na /G i da pise admin ime itd i kad si gm da pise da si gm za /a chat valja to sam stavio samo za admine,,,kad nisam gm stavim si admina a gm na 0 lvl on pise tamo gamemaster 0 lvl..
Dio skripte:eo komande
if(strcmp(cmd, "/g", true) == 0 || strcmp(cmd, "/gmaster", 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, "USAGE: (/a)dmin [admin chat]");
return 1;
}
format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
format(string, sizeof(string), "*%d GameMaster %s: %s", PlayerInfo[playerid][pGameMaster], sendername, result);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
{
SendAdminMessage(COLOR_YELLOW, string);
}
printf("Admin %s: %s", sendername, result);
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/


2 problem..

Skripta koju koristim:Gta:Rp
Detaljan opis problema: Posao.....imam komnadu posao /posao da mozes ic bez onog accept job ali sad nezz napravit u tu komandu za dva posla..
Dio skripte:eo komande
   if(strcmp(cmd, "/posao", true) == 0)//ovdje zamjenite kako ocete da vam glasi komanda za uzet posao
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(5.0,playerid,811.9537,-1442.2413,13.4979))//ovdje zamjenite kordinate xyz koje ste malo prije spremili
        {
        if(PlayerInfo[playerid][pLevel] < 5)
            {
            SendClientMessage(playerid, COLOR_GREY, "  Morate biti minimalno lv5+ za ovaj posao !");
            return 1;
            }
            if(PlayerInfo[playerid][pJob] == 0) //ovo sluzi za provjeru ako igrac nema posao da moze uzeti ovaj
            {
                PlayerInfo[playerid][pJob] = 5;//ovo sluzi za postavljanje posla
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_YELLOW, " Postao si Taxi vozac, prevozi putnike i zaradi!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " *Komanda: /fare ");
            }
            else
        {
            SendClientMessage(playerid, COLOR_GREY, "  Vec ste zaposleni, prvo daj otkaz(/otkaz) pa se vratite nazad !");
            return 1;
            }
        }
    }
    return 1;
}


eo ja sam ovako ubacivo ali nece dobijem erore...
http://pastebin.com/UyxURd2n

Neke slike/video za lakse dobivanje pomoci(neobavezno):/

Hvala

if(strcmp(cmd, "/g", true) == 0 || strcmp(cmd, "/gmaster", 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, "USAGE: (/a)dmin [admin chat]");
            return 1;
         }
         format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
         format(string, sizeof(string), "*%d GameMaster %s: %s", PlayerInfo[playerid][pGameMaster], sendername, result);
         if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
         {
            format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
         }
                        if (PlayerInfo[playerid][pGameMaster] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            format(string, sizeof(string), "*%d GameMaster %s: %s",PlayerInfo[playerid][pGameMaster], sendername, result);
         }
         printf("Admin %s: %s", sendername, result);
      }
      return 1;
   }

sad nemogu pisat al jel znas ovaj 2..problem

Ovo skini iz ovog gore sto sam ti dao:

format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
         format(string, sizeof(string), "*%d GameMaster %s: %s", PlayerInfo[playerid][pGameMaster], sendername, result);