recreate a function
#1

i want to make print so that it does SendClientMessageToAll too.

it MUST be a stock function, as imho they generate better errors if used wrong.

i would like it to do:
pawn Код:
print(string[]){
SendClientMessageToAll(0xffffff,string);
print(string);
}
Reply
#2

SendClientMessageToAll(0xffffff, " message here");

I think if is work ok------- if is doesnt work.. contact with scripters !!!!!!!
Reply
#3

lol, i want it to be in one function, not adding a extra line..
Reply
#4

Do you want the actual function to be called, "print"?
Reply
#5

if can, yes.
Reply
#6

Quote:
Originally Posted by [ADC]Aldi96
Посмотреть сообщение
SendClientMessageToAll(0xffffff, " message here");

I think if is work ok------- if is doesnt work.. contact with scripters !!!!!!!
^Oh, God...

Anyways, I'm not really sure what you want but here.
pawn Код:
stock _print(string[])
{
    SendClientMessageToAll(0xffffff,string);
    print(string);
}
I think you can't call it "print".
Reply
#7

It would be possible with hooking, take a look at ******'s hooking library (yes, he made one)

I could create the function, but i would have to rename it, as i have never touched hooking before (As my gamemode just forwards everything to other scripts, and so if i include something, i just forward it from the original callback)


Quote:
Originally Posted by xRyder
Посмотреть сообщение
I think you can't call it "print".
You can, you need to hook the original
Reply
#8

the hooking library is for callbacks only i think (as from what i read..)
Reply
#9

How about:

pawn Код:
#define print( _print(
Reply
#10

do i need to include _ too when i call the function?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)