Hey ich habe ein Problem unswa gibt meine Varriable
PickupWelt immer 0 auf ?
Der Print
[27.07.2016 - 20:27:14] ID = 36, Welt = 0
[27.07.2016 - 20:27:32] ID = 5, Welt = 0
//Abfrage
Code
for(new i = 0; i < sizeof(PickupInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, PickupInfo[i][PickupPos][0], PickupInfo[i][PickupPos][1], PickupInfo[i][PickupPos][2]))
{
printf("ID = %d, Welt = %d",PickupInfo[i][ID],PickupInfo[PickupInfo[i][ID]][PickupWelt]);
if(GetPlayerVirtualWorld(playerid) == PickupInfo[i][PickupWelt])
{
Beim Erstellen Funktioniert es
Da habe ich mir PickupWelt mal geprintet und es kam 1
//Erstellen
Code
new lCount, lStart = GetTickCount(), Float:X, Float:Y, Float:Z, type, welt, model, SaveID, id, action, fraktion;
if(rows)
{
while(lCount < rows)
{
cache_get_field_content(lCount, "id", lResult), SaveID = strval(lResult);
cache_get_field_content(lCount, "x", lResult), X = floatstr(lResult);
cache_get_field_content(lCount, "y", lResult), Y = floatstr(lResult);
cache_get_field_content(lCount, "z", lResult), Z = floatstr(lResult);
cache_get_field_content(lCount, "type", lResult), type = strval(lResult);
cache_get_field_content(lCount, "welt", lResult), welt = strval(lResult);
cache_get_field_content(lCount, "modelid", lResult), model = strval(lResult);
cache_get_field_content(lCount, "action", lResult), action = strval(lResult);
cache_get_field_content(lCount, "fraktion", lResult), fraktion = strval(lResult);
id = CreateDynamicPickup(model, type, X, Y, Z, welt); //PickupInfo[MAX_PICKUPS][enum]
PickupInfo[id][ID] = SaveID;
PickupInfo[id][PickupPos][0] = X;
PickupInfo[id][PickupPos][1] = Y;
PickupInfo[id][PickupPos][2] = Z;
PickupInfo[id][PickupType] = type;
PickupInfo[id][PickupWelt] = welt;
PickupInfo[id][PickupModel] = model;
PickupInfo[id][PickupFraktion] = fraktion;
PickupInfo[id][PickupAktion] = action;
Alles anzeigen