admin chat
#1

If i made it like this..it works fine

Quote:

OnPlayerText (playerid, text)
if(pInfo[playerid][Admin] >= 1 && text[3] == '.')
{
format(str,SOS,"[O.Chat] %s[%d]: %s",pInfo[playerid][Name], playerid, text);
SendOperatorMessage(COLOR_PURPLE,str);
return 0;
}

but i want it like this(put two dots not just 1 to operator chat and 1dot for admin chat so?!)
Quote:

OnPlayerText (playerid, text)
if(pInfo[playerid][Admin] >= 1 && text[3] == '..')
{
format(str,SOS,"[O.Chat] %s[%d]: %s",pInfo[playerid][Name], playerid, text);
SendOperatorMessage(COLOR_PURPLE,str);
return 0;
}

but it gives me these errrors
Quote:

C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(1126) : error 027: invalid character constant
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(1126) : error 029: invalid expression, assumed zero
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(1126 -- 1127) : error 029: invalid expression, assumed zero
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(1126 -- 1127) : fatal error 107: too many error messages on one line

Reply
#2

PHP код:
if(pInfo[playerid][Admin] >= && text[3] == '.' && text[4] == '.'
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=335123

PHP код:
if(pInfo[playerid][Admin] >= && text[0] == '.' && text[1] == '.'
Reply
#4

you can try this

Код:
COMMAND:achat(playerid, params[])
{
	if(pInfo[playerid][Admin] >= 1)
	{
	new string[256];
	new result[256];

	if(sscanf(params, "s[256]", result))
    {
	SendClientMessage(playerid, COLOR_ERROR, "USAGE: /achat (Message).");
	return 1;
	}

	format(string, sizeof(string), "[O.Chat] %s (%i): %s", pInfo[playerid][Name],playerid,result);
	SendOperatorMessage(COLOR_PURPLE, string);
	}else{
	SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
	}
	return 1;
}
Reply
#5

already did the achat command was talking aboutt he dot w/e gave all reputation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)