[Pomoc] Pomoc oko /g chata

Započeo DeBlack, Avgust 28, 2011, 22:35:02 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Svoja
Detaljan opis problema: Pa svaki puta kad napravim (/g)amemaster chat, nevalja mi nest, nekad bude kada u /g admin napise nsto pise: 1 Admin ...: ......
A nekada bude kada admin ( head ili bilo koji ) nesto napise a da nije gamemaster pise: 0 GameMaster .....: ..... Nikako nemogu napravit kada Head/obicni admin napise nesto u /g da pise npr.: 1338|Admin| Anto_Antic kaze: hallo , i kada GM napise nesto da pise npr. 1 Gamemaster Anto_Antic kaze: Hallo , uvjek je pojesamo, il pise 0 Gamemaster Anto.... kaze: .... ( kad budem admin a ne gm ), a kada preokrenem u skripti pise, 0 Admin Anto_Antic kaze: .... Pa ako morete vi to sredit da bude sve isto vak al da valja sve, bio bi zahvalan, znam da je to neka sitnica, al sam pocetnik pa jbg nezz jos dobro :)
Dio skripte:
if(strcmp(cmd, "/g", true) == 0 || strcmp(cmd, "/gamemaster", 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, "Koristi: (/g)amemaster [GameMaster Chat]");
return 1;
}
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pGameMaster], sendername, result);
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}Admin| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pAdmin], sendername, result);
if (PlayerInfo[playerid][pGameMaster] > 1 || PlayerInfo[playerid][pAdmin] > 1)
{
SendAdminMessage(COLOR_LIGHTGREEN, string);
}
printf("{00FF00}|%d|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", playerid, sendername, result);
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
[/color]
      
DeBlack | Mapper | PS User

ovaj dio..
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pGameMaster], sendername, result);
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}Admin| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pAdmin], sendername, result);
if (PlayerInfo[playerid][pGameMaster] > 1 || PlayerInfo[playerid][pAdmin] > 1)
{
SendAdminMessage(COLOR_LIGHTGREEN, string);
}
   

probaj stavit ovako

format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pGameMaster], sendername, result);
{
   SendAdminMessage(COLOR_LIGHTGREEN, string);
}
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}Admin| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pAdmin], sendername, result);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendAdminMessage(COLOR_LIGHTGREEN, string);
}


samo poravnaj
ako nest nevlja sad u pisanju izgubio sam nisam dobro postavio..
Vratio sam se ponovo ocekjute novi server...

Jbg kad to zamjenem izbaci mi 26 errora... nesta nevalja, evo gledaj koje errore izbaci:
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1772) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1801) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1837) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1838) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1865) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2455) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2466) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2478) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2482) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2494) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2498) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2502) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2506) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2510) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2514) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2518) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2522) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2534) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2538) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2542) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2546) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2550) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2562) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2566) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2570) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2582) : error 004: function "PlayerToPoint" is not implemented
      
DeBlack | Mapper | PS User

Probaj dodati ispod jos jedan red } ako jos ima probaj jos jednu } posto je ja mislim to :D probaj nista ne kosta :)
Respect to:
Gagi_Corleone
[A]hidrokrilac
_MosT_WanteD_
Gospodin

26 errora je znak da ti fali negdje { ili ova } zagrada =)


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]

Da al mislim da mu 2 fale dole :) zatvorene :)
Respect to:
Gagi_Corleone
[A]hidrokrilac
_MosT_WanteD_
Gospodin

Evo rodjo opet cu ti pomoc

umjesto onog sta si ti metnio

format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pGameMaster], sendername, result);
format(string, sizeof(string), "{00FF00}|{FFFFFF}%d{00FF00}|{00FF00}Admin| {00FF00}%s: {FFFFFF}%s", PlayerInfo[playerid][pAdmin], sendername, result);
if (PlayerInfo[playerid][pGameMaster] > 1 || PlayerInfo[playerid][pAdmin] > 1)
{
SendAdminMessage(COLOR_LIGHTGREEN, string);
}


Metni ovo :)

if (PlayerInfo[playerid][pGameMaster] >= 1)
{
format(string, sizeof(string), "|%d|GameMaster %s: {FFFFFF}%s ", PlayerInfo[playerid][pGameMaster], sendername, result);
SendGMMessage(0x6EFF80FF,string);
printf("%s", string);
}

if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "{117EB5}|%d|Admin %s:{75B4D4} %s ", PlayerInfo[playerid][pAdmin], sendername, result);
SendGMMessage(0xFF0000FF,string);
printf("%s", string);
}

if (PlayerInfo[playerid][pAdmin] >= 1338)
{
format(string, sizeof(string), "Head Admin %s: {FFFFFF}%s ", sendername, result);
SendGMMessage(0xFF0000FF,string);
printf("%s", string);
}

Jbg sada sam compilo i opet nevalja... Ako nisam GM nemogu pisat u /g chat, a kad sebi dadnem GM-a i u /G napisem piise vak:
1338|Admin| .... : ......
Head Admin .... : .....
4 GameMaster .. : ...        ( u sva 3 oblika napise, jbg nezz kako se to more napravit ), evo ponovo dio skripte i slika kako izgleda to kad napisem:
if(strcmp(cmd, "/g", true) == 0 || strcmp(cmd, "/gamemaster", 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, "Koristi: (/g)amemaster [GameMaster Chat]");
return 1;
}
  if (PlayerInfo[playerid][pGameMaster] >= 1)
{
format(string, sizeof(string), "|%d|GameMaster %s: {FFFFFF}%s ", PlayerInfo[playerid][pGameMaster], sendername, result);
SendGameMasterMessage(0x6EFF80FF,string);
printf("%s", string);
}

if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "{117EB5}|%d|Admin %s:{75B4D4} %s ", PlayerInfo[playerid][pAdmin], sendername, result);
SendGameMasterMessage(0xFF0000FF,string);
printf("%s", string);
}

if (PlayerInfo[playerid][pAdmin] >= 1338)
{
format(string, sizeof(string), "Head Admin %s: {FFFFFF}%s ", sendername, result);
SendGameMasterMessage(0xFF0000FF,string);
printf("%s", string);
}
printf("{00FF00}|%d|{00FF00}GameMaster| {00FF00}%s: {FFFFFF}%s", playerid, sendername, result);
}
return 1;
}


A evo slika kako izgleda akd napisem nesta ( kad sei dadnem GMa ): http://www.zaslike.com/files/r13ttwe8jfweuefi9os0.png   http://www.zaslike.com/files/extqk962d4s5091l7dcq.png
      
DeBlack | Mapper | PS User

OptX

Pa ti sebi ako das i admina i GMa naravno da ce ti izbacit: GM|Tvoj_Nick: sahjskghldshg
                                                                                            1338|Tvoj_Nick: sahjasaksdaf

haah A jbg vidio sai na sliki da mi 3 puta pise moje ime -.- ... jbg... nezz kako se to more uradit
      
DeBlack | Mapper | PS User

[BUL]Salvatore

Citat: DeBlack poslato Avgust 28, 2011, 22:59:01 POSLE PODNE
Jbg kad to zamjenem izbaci mi 26 errora... nesta nevalja, evo gledaj koje errore izbaci:
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1772) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1801) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1837) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1838) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(1865) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2455) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2466) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2478) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2482) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2494) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2498) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2502) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2506) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2510) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2514) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2518) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2522) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2534) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2538) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2542) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2546) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2550) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2562) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2566) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2570) : error 004: function "PlayerToPoint" is not implemented
C:\Users\win7\Desktop\Omega-Gaming\gamemodes\BO.pwn(2582) : error 004: function "PlayerToPoint" is not implemented

Negdje ti fali { ili ova zagrada }

Ma napravio sam to sa zagradama, vise nema errora al opet nevalja, pogledaj gore slike kako izgleda kad nesta napisem, a ako nisam GM nemogu pisat u /g
      
DeBlack | Mapper | PS User

Citat: DeBlack poslato Avgust 29, 2011, 10:18:49 PRE PODNE
Ma napravio sam to sa zagradama, vise nema errora al opet nevalja, pogledaj gore slike kako izgleda kad nesta napisem, a ako nisam GM nemogu pisat u /g

evo ti moja komanda pa uredi si malo..


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[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD1, "Komanda: /g(master) [Text]");
return 1;
}
format(string, sizeof(string), "{6EF83C}| GM Chat |(%s){FFFFFF}: %s", sendername, result);
if (PlayerInfo[playerid][pGameMaster] >= 1)
{
ABroadCast(COLOR_LIGHTRED,string,1);
}
format(string, sizeof(string), "{6EF83C}| A(GM) Chat |(%s){FFFFFF}: %s", sendername, result);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
ABroadCast(COLOR_LIGHTRED,string,1);
}
printf("GameMaster/Admin %s: %s", sendername, result);
}
return 1;
}
Vratio sam se ponovo ocekjute novi server...