[Pawn] distributed enumerators - enums - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] distributed enumerators - enums (/showthread.php?tid=339) |
distributed enumerators - enums - hastlaking - 2019-04-18 example: Code: enum E_ADMIN_DATA can any of the code i gave as an example will help distributing data into enums/arrays to its usage? RE: distributed enumerators - enums - JustMichael - 2019-04-18 (2019-04-18, 12:34 AM)hastlaking Wrote: example: As far as I am aware what you are doing is perfectly acceptable. However you don't need to re-tag the assignment since both variables are already tagged with the same tag so this PHP Code: player[playerid][e_admin] = E_ADMIN_DATA:e_admin_position_none; can be just this PHP Code: player[playerid][e_admin] = e_admin_position_none; this works because `e_admin_position_none` is already part of the enum `E_ADMIN_DATA` so already has the tag and because you've declared the tag on `e_admin` inside the enum. RE: distributed enumerators - enums - hastlaking - 2019-04-18 How about for CMD's when i switch to different levels RE: distributed enumerators - enums - Ihnify - 2019-04-18 (2019-04-18, 10:56 AM)hastlaking Wrote: How about for CMD's when i switch to different levels An example of what you want? And the not quite understand From what I understand, this is what you need. PHP Code: stock E_ADMIN_DATA:RetrieveAdminLevel(playerid) |