31.10.2016, 09:33
Use sscanf instead, it works perfectly with zcmds,
download it from here: https://sampforum.blast.hk/showthread.php?tid=570927
download it from here: https://sampforum.blast.hk/showthread.php?tid=570927
PHP код:
#include <sscanf2>
CMD:placegate(playerid, params[]){
new password, Float:pPos[4];
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage( playerid, -1, "You need to exit your vehicle." );
if(sscanf(params, "i", password)) return SendClientMessage( playerid, -1, "Syntax: /placegate [password]" );
GetPlayerPos( playerid, pPos[0], pPos[1], pPos[2] );
GetPlayerFacingAngle( playerid, pPos[3] );
CreateGate( playerid, strval( params ), pPos[0], pPos[1], pPos[2], pPos[3] );
SendClientMessage( playerid, -1, "You succesfully created a movable gate. Use /gopen or /gclose." );
return 1;
}