SA-MP Forums Archive
a little error [REP+] - 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: a little error [REP+] (/showthread.php?tid=537416)



a little error [REP+] - AwokenNeoX - 15.09.2014

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 ?


Re: a little error [REP+] - SilentSoul - 15.09.2014

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;
}



AW: a little error [REP+] - AwokenNeoX - 15.09.2014

Thank you


Re: a little error [REP+] - Team_PRO - 15.09.2014

1 Question if i am not bothering

i just notice what is "OCMD"?

Based in your script


Re: a little error [REP+] - AroseKhanNiazi - 15.09.2014

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.


Re: a little error [REP+] - Team_PRO - 15.09.2014

Thanks