Jump to content
  • 0

Function heading differs from prototype


NeO

Question

Salut,am bagat in game mode la onplayertext un script anti - ip ,si vreau sa il bag si in comanda /pm ,  unde sa pun  text[],am incercat asa: public OnPlayerCommandText(playerid,text[], cmdtext[])

Dar zice : error 025: function heading differs from prototype

Unde sa pun ,sa functioneze si in /pm ,va rog.

Multumesc ???

qdbjz10.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Ti-am lasat pentru comanda /ad sa o faci [GZS]stuntman

anti-IP

    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(String2[r],text,is1,is2,255);
					if(strval(String2[r])<255) r++;
					is1=is2;
					p=1;
				}
	    	}
	    }
	    is1++;
	}
	if(r>=4)
	{
	    new String[255];
	    new Anti_Name[255];
	    GetPlayerName(playerid,Anti_Name,255);
		format(String, sizeof(String), "Anti-advertisment %s(%d): %s",Anti_Name,playerid,text);
		for(new j1=0; j1 < MAX_PLAYERS;j1++)
	      if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, String);
		for(new z=0;z<r;z++)
		{
			new pr2;
			while((pr2=strfind(text,String2[z],true))!=-1) for(new i=pr2,j=pr2+strlen(String2[z]);i<j;i++) text[i]='*';
		}
	}
Coamnada
   	if(strcmp(cmd, "/ad", true) == 0)
   	{
   	    new message[256];
      	new playername[MAX_PLAYER_NAME];
      	strmid(message, cmdtext, 3, strlen(cmdtext));
      	GetPlayerName(playerid, playername, sizeof(playername));
      	if(!strlen(message))
      	{
      		SendClientMessage(playerid, 0xFF0606FF, "Type /ad [text]");
      	}
      	else
      	{
         	format(string, sizeof(string), "{FFFFFF}[Radio]{FF0000}%s {00FF00}|Messaje by {6633FF}%s {FF0000}(playerid:%d)!",message, playername, playerid);
         	printf(string);
         	SendClientMessageToAll(0xADFF2FAA, string);
         	GivePlayerMoney(playerid,-2000);
      	}

    return 1;
    }

  • www.LcsNet.org
  • 91.233.106.13:7777
  • www.Joc-Miniclip.info

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.