Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (100)
- #include <editarea>
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(IsPlayerEditArea(playerid))
- {
- SendClientMessage(playerid, -1, "Nie możesz korzystać z komend podczas korzystania z edytora!");
- return 1;
- }
- if (strcmp("/edit", cmdtext, true, 5) == 0)
- {
- PlayerEditArea(playerid, 10);
- return 1;
- }
- return 0;
- }
- public OnPlayerEditAreaFinish(playerid, areaid, Float:minx, Float:maxx, Float:miny, Float:maxy, success)
- {
- if(success == EDITAREA_REASON_FAIL) return 1;
- switch(areaid)
- {
- case 1:
- {
- printf("%d", areaid);
- }
- case 10:
- {
- if(success == EDITAREA_REASON_CANCEL) return 1;
- new gangzone = GangZoneCreate(minx,miny,maxx,maxy);
- GangZoneShowForPlayer(playerid, gangzone, 0xFF0000FF);
- /*
- CreateDynamicRectangle(Float:minx, Float:maxx, Float:miny, Float:maxy);
- */
- }
- }
- return 1;
- }
- public OnPlayerEditAreaUpdate(playerid, areaid, Float:minx, Float:maxx, Float:miny, Float:maxy)
- {
- new str[128];
- format(str, 128, "MinX: %.1f MaxX: %.1f MinY: %.1f MaxY: %.1f | Areaid: %d", Float:minx, Float:maxx, Float:miny, Float:maxy, areaid);
- SendClientMessage(playerid, -1, str);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement