how to get a float argument
#11

Quote:
Originally Posted by Terminator3
Посмотреть сообщение
i have probably PawnCommand but how to use it ?

i need one simple function, IsPlayerConnected
There was someone (I can't remember who) posting an "invoke" package including the SDK, tutorials and pawn command with examples.
Here is it:
http://remis.square7.net/tests/Plugi...okePackage.zip
or look at my attachment.

Read the "Usage(README).txt":
Quote:

-Using PAWN functions in your plugin
---------------------------------------------------------------------
**View the examples in action in the "HelloWorld/helloworld.cpp" file!!!
Parameters:
i = integer
f = float value
s = string
v = variable
p = string var (GetPlayerName etc.)

There are 5 types of parameters that can be used for PAWN functions.
All parameters except variables ("v") and string variables ("b") can be used directly, as in this example:


//PutPlayerAtCenterOfWorld(int playerid)
int playerid = params[1];
float x = 0.0,y = 0.0,z = 0.0;
PawnCommand(&SetPlayerPos,playerid,x,y,z);


To use variable, you must use the "&" sign before the variable/stringvariable, as in this example:


GetPlayerPositionAndPrint(int playerid)
int playerid = params[1];
float x,y,z;
PawnCommand(&GetPlayerPos,playerid,&x,&y,&z);


You use the & sign to store the value of whatever you are getting.

And here is the PawnCommand readme by Peter:
http://pastebin.com/KusHkBAd (included in the package).

But Iam sure SSI, YSF and the streamer plugin have a better way of doing this, just look into their source code.
Reply


Messages In This Thread
how to get a float argument - by Terminator3 - 31.08.2010, 13:52
Re: how to get a float argument - by Terminator3 - 31.08.2010, 15:03
Re: how to get a float argument - by Terminator3 - 31.08.2010, 15:09
Re: how to get a float argument - by Terminator3 - 31.08.2010, 15:19
Re: how to get a float argument - by Aleks10 - 31.08.2010, 16:16
Re: how to get a float argument - by hencz - 31.08.2010, 16:48
Re: how to get a float argument - by Terminator3 - 01.09.2010, 19:16
Re: how to get a float argument - by Terminator3 - 02.09.2010, 16:20
Re: how to get a float argument - by RoBo - 02.09.2010, 19:13
Re: how to get a float argument - by Terminator3 - 02.09.2010, 20:02
Re: how to get a float argument - by Remis - 04.09.2010, 12:14
Re: how to get a float argument - by cyber_punk - 04.09.2010, 12:53
Re: how to get a float argument - by RoBo - 05.09.2010, 11:22

Forum Jump:


Users browsing this thread: 3 Guest(s)