Comanda /o ..
#1

COMANDA:

if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD, " You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD, " The OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You can't speak, you have been silenced !");
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_GRAD, "USAGE: (/o)oc [ooc chat]");
return 1;
}
format(string, sizeof(string), ""COLOR_LIGHTRED"(( "wh" %s: %s "COLOR_LIGHTRED"))", sendername, result);
OOCOff(COLOR_WHITE,string);
printf("%s", string);//aici
}
return 1;
}

ERRORI:

error 001: expected token: "-string end-", but found "-identifier-"
error 001: expected token: "-string end-", but found "-identifier-"
warning 215: expression has no effect
error 001: expected token: ";", but found "-identifier-"
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Quote:
Originally Posted by SkyOfficially
Посмотреть сообщение
COMANDA:

if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD, " You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD, " The OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You can't speak, you have been silenced !");
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_GRAD, "USAGE: (/o)oc [ooc chat]");
return 1;
}
format(string, sizeof(string), ""COLOR_LIGHTRED"(( "wh" %s: %s "COLOR_LIGHTRED"))", sendername, result);
OOCOff(COLOR_WHITE,string);
printf("%s", string);//aici
}
return 1;
}

ERRORI:

error 001: expected token: "-string end-", but found "-identifier-"
error 001: expected token: "-string end-", but found "-identifier-"
warning 215: expression has no effect
error 001: expected token: ";", but found "-identifier-"
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

da-mi fisierul pawn eu voi corecta!
Reply
#3

Код:
printf( "((%s: %s))",sendername,result);
Nu poti sa faci print in consolo la culori, cum ai formatat string-ul initial. Asa ca foloseste doar numele celui care scrie mesajul si ce a scris.
Reply
#4

ATENTIE ! Nu iti mai pune baza in "scripteri" astia cu da-mi in privat id,da-mi fisierul pwn.. stai linistit ca,decat iti fura gamemode-ul si atat !
P.S : Uite comanda /o din gm-ul meu.
Код:
CMD:o(playerid,params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
    if(IsPlayerConnected(playerid))
    {
		if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_YELLOW2, "Error: The OOC channel has been disabled by an Admin.");
		new text[250],string[250],sendername[25];
		if(PlayerInfo[playerid][pMuted] == 1)
        {
			format(string, sizeof(string), "You can not speak, you have been silenced for %d seconds.",PlayerInfo[playerid][pMuteTime]);
			SendClientMessage(playerid, COLOR_LIGHTRED, string);
			return 1;
		}
		if(sscanf(params, "s[250]",text)) return SendClientMessage(playerid, COLOR_GREY, "Sintaxa: {FFFFFF}/o <Message>");
		GetPlayerName(playerid,sendername,sizeof(sendername));
		format(string, sizeof(string), "(( %s: %s ))", sendername, text);
		OOCOff(COLOR_OOC,string);
		printf("%s", string);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)