11.09.2018, 11:16
PHP код:
COMMAND:deleteatm(playerid, params[])
{
new atmid;
if(PlayerInfo[playerid][pAdmin] >= 7) return SendClientMessage( playerid, COLOR_GREY, "You are not authorized to use this command!" );
if( sscanf ( params, "d", atmid)) return SendClientMessage( playerid, COLOR_GREY, "/deleteatm [atm id]" );
new string[64];
format(string,sizeof(string),"ARWIN14ATM/ATM_%d.ini",atmid);
if(!dini_Exists(string)) return SendClientMessage( playerid, COLOR_GREY, "There's no ATM with this ID!" );
dini_Remove(string);
DestroyDynamicObject(ATMInfo[NewATMID][ATMObjectID]);
DestroyDynamic3DTextLabel(ATMInfo[NewATMID][ATMText]);
return 1;
}