return a command
#1

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

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

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.
Reply
#4

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
Reply
#5

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);
Reply
#6

bumb(3 days+)
Reply
#7

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)