[Pomoc] /ekazi

Započeo Chuck:), Jul 02, 2011, 17:17:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozdrav svima.

Ovako,jedan korisnik BS Foruma mi je napravio komandu /ekazi (hvala ti na tome :D),ali kad napisem /ekazi ono meni ovako izbaci: (( Event Ime_Prezime(pise pravo ime): /ekazi ))

dio skripte:

if(strcmp("/ekazi", cmdtext, true) == 0)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
new poruka[128];
new p;
poruka = strtok(cmdtext, p);
if(!isnull(poruka))
{
new ime[24];
GetPlayerName(playerid, ime, sizeof ime);
format(string, sizeof string, "(( Event %s: %s ))", ime, poruka);
ProxDetector(100.0, playerid, string, 0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF);
}
else return SendClientMessage(playerid, COLOR_ORANGE, "Koristite: /ekazi [poruka]");
}
return 1;
}


Hvala na pomoci i LP svima

stavi umjesto cmdtext samp cmd
Just one more time.


if(strcmp("/ekazi", cmdtext, true) == 0)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
new poruka[128];
new p;
poruka = strtok(cmd, p);
if(!isnull(poruka))
{
new ime[24];
GetPlayerName(playerid, ime, sizeof ime);
format(string, sizeof string, "(( Event %s: %s ))", ime, poruka);
ProxDetector(100.0, playerid, string, 0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF);
}
else return SendClientMessage(playerid, COLOR_ORANGE, "Koristite: /ekazi [poruka]");
}
return 1;
}


Samo prekopiraj ovo umesto tvoje komande i to je to
Poslednja Izmena: Jul 02, 2011, 19:19:01 POSLE PODNE od Boki Pro

Umjesto sto je
new poruka[128];
new p;
poruka = strtok(cmdtext, p);


samo stavi:

new poruka[128];
new p;
poruka = strtok(cmd, p);
Just one more time.

Opet isto :S
napišem /ekazi i izbaci mi: " (( Event Ime_Prezime: /ekazi )) " :SS

if(strcmp(cmd, "/ekazi", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
new poruka[128];
new p;
poruka = strtok(cmdtext, p);
if(!isnull(poruka))
{
new ime[24];
GetPlayerName(playerid, ime, sizeof ime);
format(string, sizeof string, "(( Event %s: %s ))", ime, poruka);
ProxDetector(100.0, playerid, string, 0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF,0x2E97CBFF);
}
else return SendClientMessage(playerid, COLOR_ORANGE, "Koristite: /ekazi [poruka]");
}
return 1;
}


E evo ti, radit ce 100%...
Poslednja Izmena: Jul 02, 2011, 20:00:13 POSLE PODNE od EM|Pacino
Just one more time.

Evo ako ti ta ne bude radilia ova ce raditi

if(strcmp(cmd, "/ekazi", true) == 0 || strcmp(cmd, "/e", true) == 0)
{
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))
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{

SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/Ekazi [Event Kazi]");
return 1;
}
printf("[Event]%s: %s!!", sendername, result);
if (PlayerInfo[playerid][pAdmin] >=1 || PlayerInfo[playerid][pGameMaster] >= 1)
format(string, sizeof(string), "{6699FF}Event | %s kaze:(( %s ))", sendername, result);
ProxDetector(100.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
printf("%s", string);
return 1;
}
//

ovdje moze lock,rijesio sam problem.