31.08.2010, 13:52
am build a plugin and i need get a float argument to my function
sorry for me bad english
sorry for me bad english
static cell AMX_NATIVE_CALL n_gpfa( AMX* amx, cell* params ) { double x = amx_ctof(params[1]); logprintf("distance: %f", x);
and 2. how to use public function, OnPlayerDisconnect (after is load in gamemodes & filterscripts)
|
i have probably PawnCommand but how to use it ?
i need one simple function, IsPlayerConnected |
-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. |