multi functions onplayertext
#4

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
try this

PHP код:
public OnPlayerText(playeridtext[])
{
    new 
chat[200], name[MAX_PLAYER_NAME], msg[128];
    if(
IsPlayerAdmin(playerid) && text[0] == '#')
    {
        new 
pName[MAX_PLAYER_NAME];
        
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
        
format(msgsizeof(msg), "[ADMIN CHAT]%s(%d): %s"pNameplayeridtext[1]);
        
SendMessageToAdmins(msg);
    }
    else
    {
        
GetPlayerName(playeridnamesizeof(name));
        
format(chatsizeof(chat), "(%d): {EBFF00}%s{FFFFFF}",playeridtext);
        
SendPlayerMessageToAll(playeridchat);
    }
    return 
0;

I've tried your code, and for some reason it's just giving me tons of errors.
Here are my errors lines:
Код:
C:\Users\User\Desktop\SCRIPT\my creation\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(115) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(129) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(236) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(250) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(317) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(331) : error 010: invalid function or declaration
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(333) : error 010: invalid function or declaration
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(335) : error 010: invalid function or declaration
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(341) : error 021: symbol already defined: "GetPlayerName"
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(353) : error 010: invalid function or declaration
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(454) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(482) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(550) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(567) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(803) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(1140) : warning 203: symbol is never used: "pName"
C:\Users\User\Desktop\SCRIPT\my creation\gamemodes\smile.pwn(1140) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
multi functions onplayertext - by rakinz - 28.01.2017, 14:23
Re: multi functions onplayertext - by IceBilizard - 28.01.2017, 14:26
Re: multi functions onplayertext - by oMa37 - 28.01.2017, 14:31
Re: multi functions onplayertext - by rakinz - 28.01.2017, 14:33
Re: multi functions onplayertext - by rakinz - 28.01.2017, 14:35
Re: multi functions onplayertext - by rakinz - 28.01.2017, 14:59

Forum Jump:


Users browsing this thread: 1 Guest(s)