Trying Admin Chat
#1

pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2488) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2488) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2488) : error 029: invalid expression, assumed zero
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2496) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2496) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2496) : error 029: invalid expression, assumed zero
pawn Код:
if(AccInfo[playerid][Level] >= 1 && AccInfo[playerid][Level] <= 9)
    {
        new string[128];
        format(string,sizeof(string),"{5C586D}[Admin] {FF0000}%s: {FFFFFF}%s", GetPlayerName(playerid),text[]);
        SCMTA(-1,string);
        return 1;
    }
   
    if(AccInfo[playerid][Level] >= 10)
    {
        new string[128];
        format(string,sizeof(string),"{00FF00}[Owner] {FF0000}%s: {FFFFFF}%s",GetPlayerName(playerid),text[]);
        SCMTA(-1,string);
        return 1;
    }
Reply
#2

Show your SCMTA function.
Reply
#3

pawn Код:
#define SCMTA                                             SendClientMessageToAll
Reply
#4

Код:
format(string,sizeof(string),"{5C586D}[Admin] {FF0000}%s: {FFFFFF}%s", GetPlayerName(playerid),text[]);
Remove the [] from text[], you don't need it!
Reply
#5

Tnx Now The Warnings?
Reply
#6

On which lines are the warnings?

What I wrote should fix it ...
Reply
#7

Quote:
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2488) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2488) : warning 202: number of arguments does not match definition
pawn Код:
format(string,sizeof(string),"{5C586D}[Admin] {FF0000}%s: {FFFFFF}%s", GetPlayerName(playerid),text);
Quote:
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2496) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(2496) : warning 202: number of arguments does not match definition
pawn Код:
format(string,sizeof(string),"{00FF00}[Owner] {FF0000}%s: {FFFFFF}%s",GetPlayerName(playerid),text);
This!!
Reply
#8

GetPlayerName(playerid); ??

Try replacing it with GetPlayerNameEx(playerid);
Reply
#9

use it whereever in the script

Код:
stock Name(playerid)
{
       new name[MAX_PLAYER_NAME];
       GetPlayerName(playerid,name,sizeof(name));
       return name;
}
Код:
if(AccInfo[playerid][Level] >= 1 && AccInfo[playerid][Level] <= 9)
    {
        new string[128];
        format(string,sizeof(string),"{5C586D}[Admin] {FF0000}%s: {FFFFFF}%s", Name(playerid),text[0]);
        SCMTA(-1,string);
        return 1;
    }
    
    if(AccInfo[playerid][Level] >= 10)
    {
        new string[128];
        format(string,sizeof(string),"{00FF00}[Owner] {FF0000}%s: {FFFFFF}%s",Name(playerid),text[0]);
        SCMTA(-1,string);
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)