CMD:placegate( playerid, params[] ) { if(PlayerInfo[playerid][Level] >= 4) 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; }
if(PlayerInfo[playerid][Level] >=4) { Whole cmd code inside here.. } else SendClientMessage(playerid,color,"You're not admin.");
Код:
if(PlayerInfo[playerid][Level] >=4) { Whole cmd code inside here.. } else SendClientMessage(playerid,color,"You're not admin."); |
CMD:placegate( playerid, params[] ) { if(PlayerInfo[playerid][Level] >= 4) { 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; }
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;
}
if(PlayerInfo[playerid][Level] >= 4) return SendClientMessage(playerid, -1, "You are not admin");
CMD:placegate( playerid, params[] ) { if(PlayerInfo[playerid][Level] < 4) return SendClientMessage(playerid, -1, "You are not authorized to use this command"); 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; }