11.08.2018, 07:19
PHP код:
CMD:placegate(playerid, params[])
{
if(PlayerInfo[playerid][Level] >= 4) return SendClientMessage(playerid, -1, "You are not admin");
if(isnull(params)) return SendClientMessage(playerid, -1, "Syntax: /placegate [password]");
if(!strval(params)) return SendClientMessage(playerid, -1, "You need to input numbers.");
if(IsPlayerInAnyVehicle(playerid )) return SendClientMessage(playerid, -1, "You need to exit your vehicle.");
new Float:pPos[4];
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;
}