ionutuidumanu Posted June 29, 2011 Report Share Posted June 29, 2011 Cum fac sa cand vorbeste cineva pe chat sa apara coloratUitati ce am la OnPlayerText:public OnPlayerText(playerid, text[]){ if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid)) { SendClientMessage(playerid, 0xFF0000FF, "*{6EF83C} You can only send a message once every three {FFFFFF}seconds."); return 0; } if(!IsPlayerAdmin(playerid)) { if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text, false)) { SendClientMessage(playerid, 0xFF0000FF, "* {FFFFFF}Please do not repeat {F81414}yourself."); format(szPlayerChatMsg[playerid], 128, "%s", text); return 0; } } format(szPlayerChatMsg[playerid], 128, "%s", text); iPlayerChatTime[playerid] = GetTickCount(); new is1=0; new r=0; while(strlen(text[is1])) { if('0'<=text[is1]<='9') { new is2=is1+1; new p=0; while(p==0) { if('0'<=text[is2]<='9'&&strlen(text[is2])) is2++; else { strmid(strR[r],text,is1,is2,255); if(strval(strR[r])<255) r++; is1=is2; p=1; } } } is1++; } if(r>=4) { new strMy[255]; new STRname[255]; GetPlayerName(playerid,STRname,255); format(strMy, sizeof(strMy), " Nu se pote reclama %s(%d): %s",STRname,playerid,text); for(new j1=0; j1 < MAX_PLAYERS;j1++) if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, strMy); for(new z=0;z<r;z++) { new pr2; while((pr2=strfind(text,strR[z],true))!=-1) for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++) text='*'; } } return 1;} The Legend Link to comment Share on other sites More sharing options...
scr3ws0f7 Posted June 29, 2011 Report Share Posted June 29, 2011 public OnPlayerText(playerid, text[]){ if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid)) { SendClientMessage(playerid, 0xFF0000FF, "*{6EF83C} You can only send a message once every three {FFFFFF}seconds."); return 0; } if(!IsPlayerAdmin(playerid)) { if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text, false)) { SendClientMessage(playerid, 0xFF0000FF, "* {FFFFFF}Please do not repeat {F81414}yourself."); format(szPlayerChatMsg[playerid], 128, "%s", text); return 0; } } format(szPlayerChatMsg[playerid], 128, "[COD CULOARE]%s", text); iPlayerChatTime[playerid] = GetTickCount(); new is1=0; new r=0; while(strlen(text[is1])) { if('0'<=text[is1]<='9') { new is2=is1+1; new p=0; while(p==0) { if('0'<=text[is2]<='9'&&strlen(text[is2])) is2++; else { strmid(strR[r],text,is1,is2,255); if(strval(strR[r])<255) r++; is1=is2; p=1; } } } is1++; } if(r>=4) { new strMy[255]; new STRname[255]; GetPlayerName(playerid,STRname,255); format(strMy, sizeof(strMy), " Nu se pote reclama %s(%d): %s",STRname,playerid,text); for(new j1=0; j1 < MAX_PLAYERS;j1++) if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, strMy); for(new z=0;z<r;z++) { new pr2; while((pr2=strfind(text,strR[z],true))!=-1) for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++) text='*'; } } return 0;} <a href=http://devilone.ro></a> Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 Nu merge :sad: The Legend Link to comment Share on other sites More sharing options...
scr3ws0f7 Posted June 29, 2011 Report Share Posted June 29, 2011 format(szPlayerChatMsg[playerid], 128, "[COD CULOARE]%s", text);Inlocuieste mha colo [COD CULOARE] cu o culoare :| <a href=http://devilone.ro></a> Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 Am inlocuit ma doar nu puneam asa.... The Legend Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted June 29, 2011 Report Share Posted June 29, 2011 if(!IsPlayerAdmin(playerid)) { if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text, false)) { SendClientMessage(playerid, 0xFF0000FF, "* {FFFFFF}Please do not repeat {F81414}yourself."); format(szPlayerChatMsg[playerid], 128, "{E60000}%s", text); return 0; } } format(szPlayerChatMsg[playerid], 128, "{FFFF00}%s", text); iPlayerChatTime[playerid] = GetTickCount(); Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 Am pus dar degeaba The Legend Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted June 29, 2011 Report Share Posted June 29, 2011 Am pus dar degeabamah...fii mai explicit ce degeaba???iti da vreun error ceva sau ce???sau nu iti aparas culorile sau ce?... Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 Eroare numi da nu apar culori am incercat cu peste 10 coduri de culori The Legend Link to comment Share on other sites More sharing options...
IstuntmanI Posted June 29, 2011 Report Share Posted June 29, 2011 Eroare numi da nu apar culori am incercat cu peste 10 coduri de culoriDaca nu folosesti SA:MP 0.3c nu merg culorile. Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 sa:mp 0.3c folosesc... The Legend Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted June 29, 2011 Report Share Posted June 29, 2011 sa:mp 0.3c folosesc...da celalate culori care le pui in {} merg??...fa un screen cand intrii pe sv si cand scrii ceva sa vedem cum se vede... Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 29, 2011 Author Report Share Posted June 29, 2011 http://imageshack.us/photo/my-images/809/samp033g.png/ The Legend Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted June 30, 2011 Report Share Posted June 30, 2011 hmmm...ce system de admin folosesti?...incearca sa pui de acolo culorile sa vezi poate ii de acolo... Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 30, 2011 Author Report Share Posted June 30, 2011 Folosesc Ladmin4v2 da sunt cam aceleasi culori nu cred ca mere daca iau din ladmin4v2 The Legend Link to comment Share on other sites More sharing options...
Question
ionutuidumanu
Cum fac sa cand vorbeste cineva pe chat sa apara colorat
Uitati ce am la OnPlayerText:
public OnPlayerText(playerid, text[])
{
if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0xFF0000FF, "*{6EF83C} You can only send a message once every three {FFFFFF}seconds.");
return 0;
}
if(!IsPlayerAdmin(playerid))
{
if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text, false))
{
SendClientMessage(playerid, 0xFF0000FF, "* {FFFFFF}Please do not repeat {F81414}yourself.");
format(szPlayerChatMsg[playerid], 128, "%s", text);
return 0;
}
}
format(szPlayerChatMsg[playerid], 128, "%s", text);
iPlayerChatTime[playerid] = GetTickCount();
new is1=0;
new r=0;
while(strlen(text[is1]))
{
if('0'<=text[is1]<='9')
{
new is2=is1+1;
new p=0;
while(p==0)
{
if('0'<=text[is2]<='9'&&strlen(text[is2])) is2++;
else
{
strmid(strR[r],text,is1,is2,255);
if(strval(strR[r])<255) r++;
is1=is2;
p=1;
}
}
}
is1++;
}
if(r>=4)
{
new strMy[255];
new STRname[255];
GetPlayerName(playerid,STRname,255);
format(strMy, sizeof(strMy), " Nu se pote reclama %s(%d): %s",STRname,playerid,text);
for(new j1=0; j1 < MAX_PLAYERS;j1++)
if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, strMy);
for(new z=0;z<r;z++)
{
new pr2;
while((pr2=strfind(text,strR[z],true))!=-1) for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++) text='*';
}
}
return 1;
}
The Legend
Link to comment
Share on other sites
14 answers to this question
Recommended Posts