a little error [REP+]
#1

PHP код:
ocmd:kick(playerid,params[])
{
    if(!
IsPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,COLOR_YELLOW,"You need to be Admin Level 3+ to use this Command");
    new 
pIDreason[128],string[128];
    if(
IsPlayerAnAdmin(pID,3)) return SendClientMessage(playerid,0xFFFFFF,"You are not allow to kick an Admin!");
    if(
sscanf(params,"us",pID,reason))return SendClientMessage(playerid,COLOR_YELLOW,"**Usage: /kick [Playerid] [Reason]");
    
format(string,sizeof(string),"%s has been kicked by Admin %s [Reason]: %s",PlayerName(pID),Playername(playerid),reason);
    
SendClientMessageToAll(COLOR_RED,string);
    
Kick(pID);
    return 
1;

PHP код:
Current directoryC:\Users\Vaio\Desktop\My Server 0.3z\gamemodes
ufs
.pwn(237) : error 017undefined symbol "Playername"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error
.
================ 
READY ================ 
where is the Problem ?
Reply
#2

format(string,sizeof(string),"%s has been kicked by Admin %s [Reason]: %s",PlayerName(pID),Playername(playerid),reason) ; here is the problem. you don't have this function Playername.

add this anywhere in your script:
pawn Код:
stock PlayerName(playerid)
{
     new pName[25];
     GetPlayerName(playerid, pName, sizeof(pName));
     return pName;
}
Reply
#3

Thank you
Reply
#4

1 Question if i am not bothering

i just notice what is "OCMD"?

Based in your script
Reply
#5

Quote:
Originally Posted by Team_PRO
Посмотреть сообщение
1 Question if i am not bothering

i just notice what is "OCMD"?

Based in your script
its an other command processor don't know much about it never released on sa-mp forums or deleted
http://forum.sa-mp.de/gta-multiplaye...-include-ocmd/
http://gta-sa-mp.de/forum/3-san-andr...7-ocmd-sscanf/
http://forum.sa-mp.de/gta-multiplaye...ate-3-11-2013/
****** Search.
Reply
#6

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)