Jump to content
  • 0

Ajutor cum pot sa fac sa vorbeasca playeri cu (Vip) (Admins)


TheDanutzelu

Question

14 answers to this question

Recommended Posts

cel mai bine ar fii sa folosesti pt chestia asta 0admin...pt ca, cu includele ala poti sa faci ce vrei in GM-ul tau si nu mai trebuie sa pui systemul de admin in GM..deci pt 0admin ar fii cam asa:

public OnPlayerText(playerid,text[])
{
    new amessagetext[128];
    new vmessagetext[128];
    if (GetPlayerLevel(playerid, >= 1)
    {
         format(amessagetext, 128, "{E60000}(Admin)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, amessagetext);
    }
    if (GetPlayerVip(playerid, >= 1)
    {
         format(vmessagetext, 128, "{0000BB}(Vip)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, vmessagetext);
     }
}
EDIT:se poate:D uite asa:
public OnPlayerText(playerid,text[])
{
    new amessagetext[128];
    new vmessagetext[128];
    if(AccInfo[playerid][Level] >= 1)
    {
         format(amessagetext, 128, "{E60000}(Admin)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, amessagetext);
    }
    if(AccInfo[playerid][pVip] >= 1)
    {
         format(vmessagetext, 128, "{0000BB}(Vip)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, vmessagetext);
    }
}

Fara reclama in semnatura!

Link to comment
Share on other sites

spedy eu vreau in luxadmin se poate?

asta ii in LuxAdmin:

public OnPlayerText(playerid,text[])
{
    new amessagetext[128];
    new vmessagetext[128];
    if(AccInfo[playerid][Level] >= 1)
    {
         format(amessagetext, 128, "{E60000}(Admin)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, amessagetext);
    }
    if(AccInfo[playerid][pVip] >= 1)
    {
         format(vmessagetext, 128, "{0000BB}(Vip)(%d): %s", playerid, text);
	 SendPlayerMessageToAll(playerid, vmessagetext);
    }
}

Fara reclama in semnatura!

Link to comment
Share on other sites

ms spedy a mers ma poti scapa de warningurile astea

D:\Serverul meu de Sa-Mp\Romania Moldova Stunt\Romania Moldova Stunt\filterscripts\LuxAdmin.pwn(1120) : warning 217: loose indentation

D:\Serverul meu de Sa-Mp\Romania Moldova Stunt\Romania Moldova Stunt\filterscripts\LuxAdmin.pwn(1124) : warning 217: loose indentation

D:\Serverul meu de Sa-Mp\Romania Moldova Stunt\Romania Moldova Stunt\filterscripts\LuxAdmin.pwn(1129) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

3 Warnings.

si acuma daca vb cineva cu vip scrie  de ex

Grove(Vip)(id:0)

------------------------------------------------------

Grove:ce mai faceti <-- ma poti scapa de asta

si daca nare nimik playeru admin sau vip sa vb Ex

Grove:sal

Link to comment
Share on other sites

deci am scris de ex sal si am vip si dupa ce am scris sal apare cu nume(vip):

si dupaia apare si numele simplu de ex nume:sal

eu vreau sa apara doar vip sau admin de ex nume(vip):sal

nu sa mai apara odata si nume:sal

intelegi uite poza sa vezi

link : http://imageshack.us/photo/my-images/864/salm.png/

Link to comment
Share on other sites

new word[256],Index;while(Index < strlen(text)) {

word = strtok(text,Index);

if(CheckAdv(word)==1){

new i=strfind(text,word),j=i+strlen(word)-1; text[i++]='[';

while(i<j) {text='•';i++;}

Ban(playerid);

text[j]=']';

}

}

SetPlayerChatBubble(playerid, text, 0xFFFFFFAA, 300.0, 10000);

new tstr[128];

format(tstr, 128,"[%i]: %s", playerid,text);

SendPlayerMessageToAll(playerid,tstr);

return 0;

}

stock CheckAdv(word[])

{

if(strlen(word)>22) return 0;

if(strfind(word,".", true)==-1) return 0;

new ip[5][256],index;

ip[0] = strtok(word,index,'.');

ip[1] = strtok(word,index,'.');

ip[2] = strtok(word,index,'.');

if(strfind(word,":",true)>0){

ip[3] = strtok(word,index,':');

if(strfind(word,",",true)>0) ip[4] = strtok(word,index,',');else ip[4] = strtok(word,index);

} else {

if(strfind(word,",",true)==strlen(word)) ip[3] = strtok(word,index,',');else ip[3] = strtok(word,index);

valstr(ip[4],0);

}

if(!IsNumeric(ip[0])||!IsNumeric(ip[1])||!IsNumeric(ip[2])||!IsNumeric(ip[3])||!IsNumeric(ip[4])

||!strlen(ip[0])||!strlen(ip[1])||!strlen(ip[2])||!strlen(ip[3])||!strlen(ip[4])

||(strval(ip[0])==192&&strval(ip[1])==168)

||(strval(ip[0])==172&&strval(ip[1])>=16&&strval(ip[1])<=31)

||strval(ip[0])==10||(strval(ip[0])==127&&strval(ip[1])==0&&strval(ip[2])==0&&strval(ip[3])==1)) return 0;

return 1;

}

//------------------------------------------------------------------------------

Link to comment
Share on other sites

dc ai pus si stock ala?:))

uite pune asa la onplayertext:

new word[256],Index;while(Index < strlen(text)) {
      word = strtok(text,Index);
      if(CheckAdv(word)==1){
         new i=strfind(text,word),j=i+strlen(word)-1; text[i++]='[';
         while(i<j) {text='•';i++;}
         Ban(playerid);
         text[j]=']';
      }
   }

   SetPlayerChatBubble(playerid, text, 0xFFFFFFAA, 300.0, 10000);
   return 0;
}

si incerca akm...

Fara reclama in semnatura!

Link to comment
Share on other sites

Pune asta oriunde in LuxAdmin.pwn:

	//(Vip)
	if( AccInfo[ playerid ][ pVip ] > 0 )
	{
	    new string[ 128 ];
	    format( string, 128, "(Vip): %s", text );
	    SendPlayerMessageToAll( playerid, string );
	    return 0;
	}
	return 1;
}

Vezi sa nu amesteci cu alte chestii..

P.S: stuntman mi-a aratat cum sa fac :smiley: si app asta e doar pentru VIP.

E mai simplu asa..

www.youtube.com/thebwgg

Link to comment
Share on other sites

Pune asta oriunde in LuxAdmin.pwn:

	//(Vip)
	if( AccInfo[ playerid ][ pVip ] > 0 )
	{
	    new string[ 128 ];
	    format( string, 128, "(Vip): %s", text );
	    SendPlayerMessageToAll( playerid, string );
	    return 0;
	}
	return 1;
}

Vezi sa nu amesteci cu alte chestii..

P.S: stuntman mi-a aratat cum sa fac :smiley: si app asta e doar pentru VIP.

E mai simplu asa..

nu se pune oriunde in FS se pune la onplayertext...si daca nu ai obs iam dat eu deja:P

Fara reclama in semnatura!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.