04.09.2010, 12:14
Quote:
i have probably PawnCommand but how to use it ?
i need one simple function, IsPlayerConnected |
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. |
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.