03.09.2012, 07:06
(
Последний раз редактировалось Roko_foko; 03.09.2012 в 09:09.
)
I want to make objects that are visible only for one player with incognitos streamer.
As CreateDynamicObjectEx should look like this:
I did it this way:
Error that I am getting:
As constant, I think it is aiming at '{playerid}' (when I put any constant on place of it it's fine). The only solution of this problem that I see is:
But it looks crazy. Is there a better solution, and why does it need to be a constant anyway?
Thank you in advance.
As CreateDynamicObjectEx should look like this:
Код:
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
pawn Код:
CreateDynamicObjectEx(1454, -209.0760,-33.3091,3.0828, 0, 0, 0, 0, 200, {0},{ 0 }, {playerid});
Код:
error 008: must be a constant expression; assumed zero
pawn Код:
switch(playerid)
{
case 0:CreateDynamicObjectEx(1454, -209.0760,-33.3091,3.0828, 0, 0, 0, 0, 200, {0},{ 0 }, {0});
case 1:CreateDynamicObjectEx(1454, -209.0760,-33.3091,3.0828, 0, 0, 0, 0, 200, {0},{ 0 }, {1});
case 2:CreateDynamicObjectEx(1454, -209.0760,-33.3091,3.0828, 0, 0, 0, 0, 200, {0},{ 0 }, {2});
//...
case 499:CreateDynamicObjectEx(1454, -209.0760,-33.3091,3.0828, 0, 0, 0, 0, 200, {0},{ 0 }, {499});
}
Thank you in advance.