SA-MP Forums Archive
[Pedido] Criar /setkills /setdeaths - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Criar /setkills /setdeaths (/showthread.php?tid=622314)



Criar /setkills /setdeaths - galazoiadria - 20.11.2016

Ola Galera do forum queria pedir ajuda de vocкs para criar 2 cmds um de /setkills e de /setdeaths pros admins level 8


Re: Criar /setkills /setdeaths - ipsLuan - 20.11.2016

Tenha um bom proveito!

PHP код:
command(setkillsplayeridparams[])
{
    new 
jogadorkills;
    if(@
admin[playerid][level] < 8)
    {
        if(
sscanf(params"ud"jogadorkills)) return SendClientMessage(playerid, -1"[!] Syntax error.");
        
SetPlayerKill(jogadorkill); //altere
    

    return 
1;
}

command(setdeathsplayeridparams[])
{
    new 
jogadordeath;
    if(@
admin[playerid][level] < 8)
    {
        if(
sscanf(params"ud"jogadordeath)) return SendClientMessage(playerid, -1"[!] Syntax error.");
        
SetPlayerDeath(jogadordeath); //altere
    

    return 
1;




Re: Criar /setkills /setdeaths - galazoiadria - 20.11.2016

Код:
dcmd_setkills(playerid,params[]) {
tem como vc fazer tipo assim


Re: Criar /setkills /setdeaths - IlanZ - 21.11.2016

Quote:
Originally Posted by galazoiadria
Посмотреть сообщение
Код:
dcmd_setkills(playerid,params[]) {
tem como vc fazer tipo assim
PHP код:
dcmd_setkills(playeridparams[])
{
    new 
jogadorkills;
    if(@
admin[playerid][level] < 8)
    {
        if(
sscanf(params"ud"jogadorkills)) return SendClientMessage(playerid, -1"[!] Syntax error.");
        
SetPlayerKill(jogadorkill); //altere
    

    return 
1;
}
dcmd_setdeaths(playeridparams[])
{
    new 
jogadordeath;
    if(@
admin[playerid][level] < 8)
    {
        if(
sscanf(params"ud"jogadordeath)) return SendClientMessage(playerid, -1"[!] Syntax error.");
        
SetPlayerDeath(jogadordeath); //altere
    

    return 
1;

Assim?


Re: Criar /setkills /setdeaths - galazoiadria - 21.11.2016

deu erro

Код:
error 017: undefined symbol "@admin"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zeroF: 
fatal error 107: too many error messages on one line



Re: Criar /setkills /setdeaths - ipsLuan - 21.11.2016

Lуgico. Isso foi apenas uma base. Vocк tem que ir adaptando o cуdigo.