SA-MP Forums Archive
How use params into OnDialogResponse - 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: How use params into OnDialogResponse (/showthread.php?tid=664468)



How use params into OnDialogResponse - FlaNy - 01.03.2019

I need use ZCMD To return command

Quote:

D:\Survival Dub\gamemodes\SD.pwn(474) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Код:
    
if(dialogid == DIALOG_VIP){
    if(response)
    {
    switch(listitem)
    {
    case 0: return cmd_kill(playerid); //test, obviously I'll change this command   (line 474)
    case 1: 
    GivePlayerWeapon(playerid, WEAPON_AK47, 120);
    case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28);
    }
    }
    return 1;
    }
Error


Re: How use params into OnDialogResponse - Swarn - 01.03.2019

I don't think you can return commands in a dialog response, change cmd_kill(playerid); to SetPlayerHealth(playerid 0);


Re: How use params into OnDialogResponse - PPC23 - 01.03.2019

You could try
return return cmd_kill(playerid, "");

You can also take a look at this post


Re: How use params into OnDialogResponse - SymonClash - 01.03.2019

Quote:
Originally Posted by Swarn
Посмотреть сообщение
I don't think you can return commands in a dialog response, change cmd_kill(playerid); to SetPlayerHealth(playerid 0);
Yes he can.

pawn Код:
cmd_yourcommandname(playerid,"");
@PPC23, no need for return.