SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

 
 
Thread Tools Display Modes
Old 03/06/2016, 02:26 AM   #1
SkyOfficially
Little Clucker
 
Join Date: Sep 2015
Posts: 18
Reputation: 0
Default Comanda /o ..

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 (c) 1997-2006, ITB CompuPhase


4 Errors.
SkyOfficially is offline  
Old 03/06/2016, 03:16 AM   #2
shiftlol
Banned
 
Join Date: Dec 2014
Location: Republic of Moldova
Posts: 43
Reputation: 2
Default Re: Comanda /o ..

Quote:
Originally Posted by SkyOfficially View Post
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 (c) 1997-2006, ITB CompuPhase


4 Errors.


da-mi fisierul pawn eu voi corecta!
shiftlol is offline  
Old 03/06/2016, 06:42 AM   #3
Lucky13
Huge Clucker
 
Lucky13's Avatar
 
Join Date: Dec 2015
Location: Romania
Posts: 312
Reputation: 68
Default Re: Comanda /o ..

Code:
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.
Lucky13 is offline  
Old 03/06/2016, 06:10 PM   #4
jazzyKISS
Huge Clucker
 
jazzyKISS's Avatar
 
Join Date: May 2015
Location: Craiova City
Posts: 328
Reputation: 2
Default Re: Comanda /o ..

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.
Code:
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;
}
jazzyKISS is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 11:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.