[Pomoc] /hepm

Započeo William Johnson, Jul 13, 2011, 19:57:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: Street Stories EDIT
Detaljan opis problema: ja kad idem /hepm tj head admin pm, nepokaze adminim cjelu tu pm neg smao 2 rjeci od nje.. kako da napravim da cjelu pokaze`??
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

if(strcmp(cmd, "/hepm", true) == 0 || strcmp(cmd, "/hep", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Nisi logiran!");
           return 1;
       }
       if(PlayerInfo[playerid][pAdmin] >= 1338)
       {
               tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: (/hepm(/hep)[ID/Dio Imena] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nemozes sam sebi poslati PM!");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[300];
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: (/pm) [ID/Dio Imena] [text]");
return 1;
}
format(string, sizeof(string), "*{00A6FF}PM {00A6FF}od {00A6FF}Head {00A6FF}Admina {00A6FF}%s: {FFFFFF}%s",sendername,result);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* PM Poslan %s (%d): %s", giveplayer, giveplayerid, (result));
SendClientMessage(playerid,  COLOR_GREEN, string);
format(string, sizeof(string), "{00A6FF}HeadAdmin {FFFFFF}%s {00A6FF}je {00A6FF}poslao {00A6FF}PM {FFFFFF}%s {00A6FF}(%d): {FFFFFF}%s.",sendername,giveplayer,giveplayerid,result);
SendAdminMessage(COLOR_LIGHTRED,string);

return 1;
}
}
else
{
format(string, sizeof(string), "   %d nije na serveru.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
else
{
   SendClientMessage(playerid, COLOR_GRAD1, " Nisi Head Admin!!");
   return 1;
}
}
return 1;
}
Poslednja Izmena: Jul 13, 2011, 20:17:17 POSLE PODNE od |β3tα|_eXtreme_

pa pogle koliko si ovih boja stavio..sta je to cirkus...
Vratio sam se ponovo ocekjute novi server...

Dodaj ovo u tu komandu:
new string[128];
I onda ce slati poruku...Prekratak je String pa salje samo 2 reci...


u supak gdje omfg pa gdje ces dodati, neces sigurno u neku FS nego u tu koamndu :S Pri vrhu koamnde, os da crtam, ide mi PS
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Citat: System32 poslato Jul 13, 2011, 20:58:56 POSLE PODNE
u supak gdje omfg pa gdje ces dodati, neces sigurno u neku FS nego u tu koamndu :S Pri vrhu koamnde, os da crtam, ide mi PS
Nemoj tako da ****.Vidis da je i  novi član  i ako mu zelis pomozi mu na lijep nacin a ne ovako.


Citat: William Johnson poslato Jul 13, 2011, 20:32:04 POSLE PODNE
Gdje tocno da to dodam?? :D
To dodajes pre prvog koristenja "stringa"...
Evo ovako bi to trebalo da izgleda:
if(strcmp(cmd, "/hepm", true) == 0 || strcmp(cmd, "/hep", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi logiran!");
            return 1;
        }
        if(PlayerInfo[playerid][pAdmin] >= 1338)
        {
                tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: (/hepm(/hep)[ID/Dio Imena] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nemozes sam sebi poslati PM!");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[300];
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: (/pm) [ID/Dio Imena] [text]");
return 1;
}
                                                new string[128];
format(string, sizeof(string), "*{00A6FF}PM {00A6FF}od {00A6FF}Head {00A6FF}Admina {00A6FF}%s: {FFFFFF}%s",sendername,result);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* PM Poslan %s (%d): %s", giveplayer, giveplayerid, (result));
SendClientMessage(playerid,  COLOR_GREEN, string);
format(string, sizeof(string), "{00A6FF}HeadAdmin {FFFFFF}%s {00A6FF}je {00A6FF}poslao {00A6FF}PM {FFFFFF}%s {00A6FF}(%d): {FFFFFF}%s.",sendername,giveplayer,giveplayerid,result);
SendAdminMessage(COLOR_LIGHTRED,string);

return 1;
}
}
else
{
format(string, sizeof(string), "   %d nije na serveru.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_GRAD1, " Nisi Head Admin!!");
    return 1;
}
}
return 1;
}

To stavi i radice ti..