Map Editor Help
#1

I Have This map editor which came with ravens roleplay i want the command /mapeditor for only admins (its a filterscript) can someone help
Reply
#2

Show the command code please?
Reply
#3

its a filterscript
Reply
#4

Show the /mapeditor command from the filterscript?
Reply
#5

CMD:mapeditor(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "SA-MP Map Editor 1.0", "New object\nDelete object\nEnable selector\nObjects\nSearch by objects\nOpen Map\nSave Map\nClose Map\nConfigurations", "Select", "Close");
return 1;
}
Reply
#6

pawn Код:
CMD:mapeditor(playerid, params[])
{
     if(!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, RED, "You're not an admin");
    }else{
        //code
    }
    return 1;
}
Reply
#7

Quote:

CMD:mapeditor(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0xFF0000C8, "You do not have permission to use this command!");
}else {
ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "SA-MP Map Editor 1.0", "New object\nDelete object\nEnable selector\nObjects\nSearch by objects\nOpen Map\nSave Map\nClose Map\nConfigurations", "Select", "Close");
}
return 1;
}

(2757) : warning 217: loose indentation

would be the return 1;
Reply
#8

also how i only make admin level 1337 and 1338 can use this?
Reply
#9

pawn Код:
CMD:mapeditor(playerid,params)
{
if(PlayerInfo[playerid][Level] >= 1337 || IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "SA-MP Map Editor 1.0", "New object\nDelete object\nEnable selector\nObjects\nSearch by objects\nOpen Map\nSave Map\nClose Map\nConfigurations", "Select", "Close");
}
else return SendClientMessage(playerid,COLOR,"ERROR:You are not at enough level to use this command");
}
Hope it helped.
But be sure to change the variables which u took for Admin Level like in ladmin its PlayerInfo and in LuxAdmin its AccInfo.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)