ooc chat admin aduty green chat
#1

who can help me ?
i want to make this script like when the admin is /aduty , when he want to talk in /b chat the name is green colour.

Код:
CMD:b(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
	if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Perdorimi: /b [local ooc chat]");
	if(AntiAdv(playerid, params)) return 1;
	new string[128];
	if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "Stranger says: (( %s ))", params); }
	else { format(string, sizeof(string), "%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
	ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
	return 1;
}
who can help me ??

sorry for eng
Reply
#2

Answer is in front of your eyes, just think for a second and you will get it.

If you can't be bothered do like this.

pawn Код:
if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "Stranger says: (( %s ))", params); }
else if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "{00ff00}%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
    else { format(string, sizeof(string), "%s says: (( %s ))", GetPlayerNameEx(playerid), params); }

change {00ff00} to your green color you want.
Reply
#3

Quote:

F:\SAMP\gamemodes\EARP.pwn(5286) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(5290) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(18503) : error 017: undefined symbol "string"
F:\SAMP\gamemodes\EARP.pwn(18503) : error 017: undefined symbol "string"
F:\SAMP\gamemodes\EARP.pwn(18503) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\EARP.pwn(18503) : fatal error 107: too many error messages on one line

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


4 Errors.


it is showing me errors brow

Quote:

CMD:b(playerid, params[])
{
if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "Stranger says: (( %s ))", params); }
else if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "{0x33AA33AA}%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
else { format(string, sizeof(string), "%s says: (( %s ))", GetPlayerNameEx(playerid), params); }

if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Perdorimi: /b [local ooc chat]");
if(AntiAdv(playerid, params)) return 1;
new string[128];
if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "Stranger says: (( %s ))", params); }
else { format(string, sizeof(string), "%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 1;
}

Reply
#4

pawn Код:
CMD:b(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Perdorimi: /b [local ooc chat]");
    if(AntiAdv(playerid, params)) return 1;
    new string[128];
    if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "Stranger says: (( %s ))", params); }
    else if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "{33AA33}%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
    else { format(string, sizeof(string), "%s says: (( %s ))", GetPlayerNameEx(playerid), params); }
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
    return 1;
}

Why did you pasted it up there? and check this link about Color embedding

https://sampwiki.blast.hk/wiki/Colors_Li...olor_embedding
Reply
#5

Quote:

F:\SAMP\gamemodes\EARP.pwn(5286) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(5290) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(18509) : error 017: undefined symbol "COLOR_F"
F:\SAMP\gamemodes\EARP.pwn(18509) : error 017: undefined symbol "ADE4"
F:\SAMP\gamemodes\EARP.pwn(18509) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\EARP.pwn(18509) : fatal error 107: too many error messages on one line

undefined symbol ? how to fix it
Reply
#6

helpp
Reply
#7

F:\SAMP\gamemodes\EARP.pwn(5286) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(5290) : warning 202: number of arguments does not match definition
F:\SAMP\gamemodes\EARP.pwn(18509) : error 017: undefined symbol "COLOR_F"
F:\SAMP\gamemodes\EARP.pwn(18509) : error 017: undefined symbol "ADE4"
F:\SAMP\gamemodes\EARP.pwn(18509) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\EARP.pwn(18509) : fatal error 107: too many error messages on one line





5286: You use some function with not matching parameters, example : SetPlayerHealth(playerid,100.0,3); // 3 would be arguments does not match definition

5290: You use some function with not matching parameters, example : SetPlayerHealth(playerid,100.0,3); // 3 would be arguments does not match definition

18509: You are using COLOR_F and ADE4 before you have used #define COLOR_F and #define ADE4, example:

SetPlayerHealth(playerid,HP);
new HP = 5;


I can't help you, if you dont know basic scripting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)