SA-MP Forums Archive
(SERVER:. Unknown command) - strmid! - 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: (SERVER:. Unknown command) - strmid! (/showthread.php?tid=584796)



(SERVER:. Unknown command) - strmid! - JoshNudock - 08.08.2015

Hello, my code is not working, he did two years, someone help me? when I type the command / accept company (performs the part of code) appears "SERVER:. Unknown command", why? what did I do wrong?
PHP код:
            else if (strcmp(pVariavel"empresa"true) == 0)
            {
                if (
OfereceuEmpresa[playerid] == -1)
                    return 
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Ninguйm lhe ofereceu uma empresa.");
                if (
AccountData[playerid][pPbiskey] != 255)
                    return 
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк jб possui uma empresa.");
                if (
IsPlayerConnected(OfereceuEmpresa[playerid]))
                {
                    if(
GetPlayerMoney(playerid) < OfereceuEmpresaValor[playerid])
                        return 
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк nгo tem dinheiro suficiente em mгos.");
                    if (
isequal(ReturnPlayer(OfereceuEmpresa[playerid]), SBizzInfo[OfereceuEmpresaID[playerid]][sbOwner]))
                        
strmid(SBizzInfo[OfereceuEmpresaID[playerid]][sbOwner], ReturnPlayer(playerid), 32strlen(ReturnPlayer(playerid)), 255);
                    if(
isequal(ReturnPlayer(OfereceuEmpresa[playerid]), BizzInfo[OfereceuEmpresaID[playerid]][bOwner]))
                        
strmid(BizzInfo[OfereceuEmpresaID[playerid]][bOwner], ReturnPlayer(playerid), 0strlen(ReturnPlayer(playerid)), 255);
                    
format(stringsizeof(string), "Vocк comprou a empresa de %s no valor de $%d."GetPlayerNameRP(OfereceuEmpresa[playerid]), OfereceuEmpresaValor[playerid]);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "%s comprou a empresa que vocк ofereceu por $%d."GetPlayerNameRP(playerid), OfereceuEmpresaValor[playerid]);
                    
SendClientMessage(OfereceuEmpresa[playerid], COLOR_LIGHTBLUEstring);
                    
GivePlayerMoney(OfereceuEmpresa[playerid], OfereceuEmpresaValor[playerid]);
                    
GivePlayerMoney(playerid, -OfereceuEmpresaValor[playerid]);
                    
AccountData[OfereceuEmpresa[playerid]][pPbiskey] = -1;
                    
AccountData[playerid][pPbiskey] = OfereceuEmpresaID[playerid];
                    
OfereceuEmpresa[playerid] = -1;
                    
OfereceuEmpresaID[playerid] = -1;
                    
OfereceuEmpresaValor[playerid] = -1;
                    
OnPropUpdate();
                }
                return 
1;
            } 



Re: (SERVER:. Unknown command) - strmid! - Yashas - 08.08.2015

Where is the /accept command?

Код:
else if (strcmp(pVariavel, "empresa", true) == 0)
Outdated method!

Start using (I)ZCMD/YCMD.