SA-MP Forums Archive
return a command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: return a command (/showthread.php?tid=260122)



return a command - Madsen - 07.06.2011

is it possible to return a command under OnPlayerDeath. I use zcmd.


Re: return a command - xRyder - 07.06.2011

Yes it is.
pawn Код:
cmd_yourcommand(playerid, params)



Re: return a command - Madsen - 07.06.2011

well it gives me 2 errors i have tried that but it did not work
pawn Код:
if(escaper[playerid] == 1)
        {
            MoveDynamicObject(gate, 1584.7552490234, -1638.1544189453, 12.365068435669, 2);
            escaper[playerid] = 0;
            cmd_leave(playerid, params);
            foreach (Player, i)
            {
                if(pursuer[i] == 1)
                {
                    GivePlayerMoney(i, 500);
                    SendClientMessage(i, COLOR_GREEN, "$500 bonus money");
                    cmd_leave(i, params);
                }
            }
        }
pawn Код:
C:\Users\Alex\Desktop\ds\Samp Servers\gamemodes\test.pwn(2590) : error 017: undefined symbol "params"
C:\Users\Alex\Desktop\ds\Samp Servers\gamemodes\test.pwn(2597) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: return a command - Skidmarks - 07.06.2011

I know what it is your trying to do! and its Something i was looking for for AGES... i will look into it. but the thing you did wrong ^^ was your closing and open brackets and u didnt define params in the public


Re: return a command - Madsen - 07.06.2011

Quote:
Originally Posted by Skidmarks
Посмотреть сообщение
I know what it is your trying to do! and its Something i was looking for for AGES... i will look into it. but the thing you did wrong ^^ was your closing and open brackets and u didnt define params in the public
there is nothing wrong with my brackets i will try to define params then.

EDIT:i do not know how to define xD. fixed the return so that it only says cmd_leave(blabla);


Re: return a command - Madsen - 10.06.2011

bumb(3 days+)


Re: return a command - Jefff - 10.06.2011

Its /leave or /leave something?
pawn Код:
cmd_leave(playerid, "blabla");
or
pawn Код:
cmd_leave(playerid, "something");



Re: return a command - Sascha - 10.06.2011

pawn Код:
cmd_leave(i, "");



Re: return a command - Madsen - 11.06.2011

Quote:
Originally Posted by Sascha
Посмотреть сообщение
pawn Код:
cmd_leave(i, "");
this helped and thanks all for helping me out