SA-MP Forums Archive
Admin Chat |help| - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin Chat |help| (/showthread.php?tid=553927)



Admin Chat |help| - AYOUYOU - 01.01.2015

Код:
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(230) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(231) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3136) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3146) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3218) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3229) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
pawn Код:
forward MessageToPlayerVIP(color,const string[]); //<<<< Line 230
forward MessageToAdmins(color,const string[]); //<<< Line 231
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && P_Data[playerid][VIP] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[DONATOR] %s: %s",string,text[1]);
        MessageToPlayerVIP(COLOR_GREEN,string); //<<< 3136
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && P_Data[playerid][pAdmin] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[ADMIN]: %s: %s",string,text[1]);
        MessageToAdmins(COLOR_GREY,string); //<<3146
        #if ADM_CHAT_LOG == true
        #endif
        return 0;
    }
public MessageToPlayerVIP(color,const string[]) //<<< 3218
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 1)
    if(P_Data[i][VIP] >= 1)
    SendClientMessage(i, color, string);
    }
    return 1;
}

public MessageToAdmins(color,const string[])//<<< 3229
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 1)
    if(P_Data[i][pAdmin] >= 1)
    SendClientMessage(i, color, string);
    }
    return 1;
}



Re : Admin Chat |help| - MCZOFT - 01.01.2015

.. lack of inforamtion always ....
turn the Forward into a STOCK , and what is that .. forward MessageToPlayerVIP(color,const string[]); , this one no need after the const string[] Use ..

by the way .. you forgot }


PHP код:

public OnPlayerText(playeridtext[])
{
// this one 



Re : Admin Chat |help| - AYOUYOU - 01.01.2015

I did'nt Give My Full OnPlayerText


Re: Admin Chat |help| - Lordzy - 01.01.2015

EDIT : DEL.


Re : Admin Chat |help| - AYOUYOU - 01.01.2015

so bro?


Re : Admin Chat |help| - MCZOFT - 01.01.2015

have you done what i've told you ? the ; and the forward to stocks .. ?


Re: Admin Chat |help| - ReD_HunTeR - 01.01.2015

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && P_Data[playerid][VIP] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[DONATOR] %s: %s",string,text[1]);
        MessageToPlayerVIP(COLOR_GREEN,string);
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && P_Data[playerid][pAdmin] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[ADMIN]: %s: %s",string,text[1]);
        MessageToAdmins(COLOR_GREY,string);
        #if ADM_CHAT_LOG == true
        #endif
        return 0;
    }

stock MessageToPlayerVIP(color,msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}

stock MessageToAdmins(color,msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}



Re : Re: Admin Chat |help| - AYOUYOU - 01.01.2015

Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && P_Data[playerid][VIP] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[DONATOR] %s: %s",string,text[1]);
        MessageToPlayerVIP(COLOR_GREEN,string);
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && P_Data[playerid][pAdmin] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[ADMIN]: %s: %s",string,text[1]);
        MessageToAdmins(COLOR_GREY,string);
        #if ADM_CHAT_LOG == true
        #endif
        return 0;
    }

stock MessageToPlayerVIP(color,msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}

stock MessageToAdmins(color,msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}
Код:
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3134) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3144) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3216) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier\gamemodes\xD.pwn(3231) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Admin Chat |help| - DavidBilla - 01.01.2015

Fixed
This should work
Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && P_Data[playerid][VIP] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[DONATOR] %s: %s",string,text[1]);
        MessageToPlayerVIP(COLOR_GREEN,string);
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && P_Data[playerid][pAdmin] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[ADMIN]: %s: %s",string,text[1]);
        MessageToAdmins(COLOR_GREY,string);
        #if ADM_CHAT_LOG == true
        #endif
        return 0;
    }

stock MessageToPlayerVIP(color[],msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}

stock MessageToAdmins(color[],msg[])
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         if(P_Data[i][VIP] >= 1)
         {
            SendClientMessage(i, color, msg);
         }
      }
   }
   return 1;
}



Re : Admin Chat |help| - AYOUYOU - 01.01.2015

But Why he Don't Work For me