enum help - 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: enum help (
/showthread.php?tid=603768)
enum help -
MRM - 27.03.2016
Hi,
This is wrong?
Код:
new MAX_VEH 2
enum CarX
{
IDveh,
CarID,
CarE,
carEx,
Text3D:CarOwner
}
new Veh[MAX_VEH][CarX] =
{
{0,522, 3, 7},
{1,411,3, 8}
};
To
Код:
new MAX_VEH 2
enum CarX
{
IDveh,
CarID,
CarE,
carEx,
Text3D:CarOwner
}
new Veh[MAX_VEH][MAX_PLAYERS][CarX] =
{
{0,522, 3, 7},
{1,411,3, 8}
};
Error : warning 213: tag mismatch
Re: enum help -
Raphinity - 27.03.2016
Yes, it's wrong.
Do you want to set a vehicle's owner by his "playerid" ?
Код:
enum CarInfos
{
CarID,
CarOwner,
CarModel,
CarE,
CarEx,
Text3D:CarOwner3DText
}
new vInfo[MAX_VEH][CarInfos] =
{
{0,-1,522,3,7,Text3D:INVALID_3DTEXT_ID},
{1,-1,411,3,8,Text3D:INVALID_3DTEXT_ID}
};
Then, you can set a CarOwner for every cars (vehicleid) :
vInfo[vehicleid][CarOwner] = playerid; // It should be a unique indentifier instead of playerid.
And the 3D Text Label :
vInfo[vehicleid][CarOwner3DText] = Create3DTextLabel(...);
Re: enum help -
MRM - 27.03.2016
Thanks.
But I need [playerid] not carowner.
Код:
for(new i = 0; i <MAX_VEH; i++)
{
Veh[i][playerid][CarE] = Create.....
Re: enum help -
czerwony03 - 27.03.2016
If you want to use 4 dimensional arrays, you have to change compilator to
https://github.com/Zeex/pawn