[Ajuda] zcmd (cmd_)
#1

Boas, queria por no dialog response assim:
PHP код:
case 116:
                {
                    if(!
response)
                    {
                        
DeletePVar(playerid"StatsTab");
                        return 
1;
                    }
                    else
                    {
                        new 
string[50];
                        
format(stringsizeof string"%s"inputtext);
                        
cmd_ban(playeridGetPVarInt(playerid"StatsTab"), string);
                    } 
Tenho o cmd ban assim:

PHP код:
CMD:ban(playerid,params[])
{
    new 
playa,Messagem[100];
    if (
sscanf(params"ds[100]"playaMessagem))return SendClientMessage(playeridCOR_CMD_INCTO"*USA: /bantr69 [PlayerID] [Razгo]"); 
Mas da warnin:
Код:
error 035: argument type mismatch (argument 2)
Ajuda ae ?
Reply
#2

cmd_ban(playerid, inputtext);

Nгo sei jб fez isso, mas vocк tem que armazenar o ID a ser banido, pq sу o cуdigo acima nгo vai funcionar
Reply
#3

id a ser banido : GetPVarInt(playerid, "StatsTab")
Reply
#4

Tente:
pawn Код:
new string[50];
format(string, sizeof string, "%d %s", GetPVarInt(playerid, "StatsTab"), inputtext);
cmd_ban(playerid, string);
Reply
#5

pawn Код:
if (sscanf(params, "us[100]", playa, Messagem))return SendClientMessage(playerid, COR_CMD_INCTO, "*USA: /bantr69 [PlayerID] [Razгo]");
https://github.com/Y-Less/sscanf/wiki/Users
Reply
#6

Resolvido.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)