SAMPHP enum - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SAMPHP enum (
/showthread.php?tid=623288)
SAMPHP enum -
TheNerka - 30.11.2016
Hello, i'm coding gamemode with SAMPHP (
https://sampforum.blast.hk/showthread.php?tid=442302), but i don't know how to create enum:
Код:
#define max_vehicles 9999
enum vInfo
{
model,
Float:x,
Float:y,
Float:z,
Float:a,
color_1,
color_2,
owner
};
new VehicleInfo[max_vehicles][vInfo];
Re: SAMPHP enum -
Sithis - 30.11.2016
Just create a PHP class and assign values to its properties? If you want to use PHP, make sure to know the language you're using!
Re: SAMPHP enum -
TheNerka - 30.11.2016
I'm developing sites and i know php, but I thought maybe there any other way on samphp. Thanks for help
Re: SAMPHP enum -
CoaPsyFactor - 30.11.2016
There is no (native) enum in PHP, you can use either class with constants or some associative array