25.02.2017, 01:31
../gamemodes/Build.pwn(12940) : error 029: invalid expression, assumed zero
../gamemodes/Build.pwn(12940) : error 017: undefined symbol "i"
../gamemodes/Build.pwn(12941) : warning 209: function "CreateLoot" should return a value
../gamemodes/Build.pwn(12942) : error 010: invalid function or declaration
../gamemodes/Build.pwn(12950) : error 010: invalid function or declaration
I want a dialog to show up here, been playing around with it for 4 hours but can't seem to get success...
../gamemodes/Build.pwn(12940) : error 017: undefined symbol "i"
../gamemodes/Build.pwn(12941) : warning 209: function "CreateLoot" should return a value
../gamemodes/Build.pwn(12942) : error 010: invalid function or declaration
../gamemodes/Build.pwn(12950) : error 010: invalid function or declaration
PHP код:
public CreateLoot(itemid1, itemid2, itemid3, itemid4, Float:X, Float:Y, Float:Z, worldid, intid)
{
new found = 0, foundid = 0, str[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(LootInfo[i][lUsed] == 0 && found == 0)
{
found++;
foundid=i;
}
}
if(found == 0) return true;
LootInfo[foundid][lUsed]=1;
LootInfo[foundid][lText]=CreateDynamic3DTextLabel(str, 0x33AA33FF, X, Y, Z-0.7, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, worldid, intid, -1, 50.0);
if(itemid1 > 21 && itemid1 < 35)
{
LootInfo[foundid][lObject] = CreateDynamicObject(PrintIid(itemid1), X, Y, Z - 1, 80.0, 0.0, 0.0, worldid);
}
if(itemid1 >= 100 && itemid1 <= 150)
{
LootInfo[foundid][lObject] = CreateDynamicObject(2037, X, Y, Z - 1, 0.0, 0.0, 0.0, worldid);
}
if(itemid1 == 403)
{
LootInfo[foundid][lObject] = CreateDynamicObject(1650, X, Y, Z - 1, 0.0, 0.0, 0.0, worldid);
}
if(itemid1 == 406)
{
LootInfo[foundid][lObject] = CreateDynamicObject(1210, X, Y, Z - 1, 0.0, 0.0, 0.0, worldid);
}
if(itemid1 >= 500 && itemid1 <= 550) = ShowPlayerDialog(i, DIALOG_PACKAGE, DIALOG_STYLE_LIST, string, "Shoe Box\nTrash Bag\nLunch Bag\nRubbish Box\nBurger Box\nDefault Drug Package", "Drop", "Cancel");
}
LootInfo[foundid][lTime]=60;
LootInfo[foundid][lItem][0]=itemid1;
LootInfo[foundid][lItem][1]=itemid2;
LootInfo[foundid][lItem][2]=itemid3;
LootInfo[foundid][lItem][3]=itemid4;
LootInfo[foundid][lX]=X;
LootInfo[foundid][lY]=Y;
LootInfo[foundid][lZ]=Z;
return true;
}
PHP код:
if(itemid1 >= 500 && itemid1 <= 550) = ShowPlayerDialog(i, DIALOG_PACKAGE, DIALOG_STYLE_LIST, string, "Shoe Box\nTrash Bag\nLunch Bag\nRubbish Box\nBurger Box\nDefault Drug Package", "Drop", "Cancel");