15.01.2011, 11:49
Quote:
So I got this idea of a secret pickup in my server, and when you enter it, a new one appear with a hint... Well what happends is when I enter the first pickup, it gives me the hint to the new location and everything works fine, but the new pikcup somehow got the SAME pickup id as the old one?? ЁI have defined everything (new vulkan; vulkan = CreateObject(bla bla bla); )
Код:
//All the other pickups is over here ЁЁ else if(pickupid == vulkan) { GivePlayerMoney(playerid, 50000); SetPlayerScore(playerid, GetPlayerScore(playerid)+50); SendClientMessage(playerid, red, "You have recieved 50000$ and 50 score for finding our treasure"); SendClientMessageToAll(red, "HINT: The Volcano Pickup has been found, the next one can be found in Vinewood!"); DestroyPickup(vulkan); vinewood = CreatePickup(1276,2,1378.1597,-807.1733,85.0415,-1); } else if(pickupid == vinewood) { GivePlayerMoney(playerid, 75000); SetPlayerScore(playerid, GetPlayerScore(playerid)+75); SendClientMessage(playerid, red, "You have recieved 75000$ and 75 score for finding our treasure"); SendClientMessageToAll(red, "HINT: The Vinewood Pickup has been found, the next one can be found in a warehouse in San Fierro!"); DestroyPickup(vinewood); } return 1; } If anyone can help me I would be happy Thank you! |
DestroyPickup(vulkan);
vinewood = CreatePickup(1276,2,1378.1597,-807.1733,85.0415,-1);
Try making them like this:
vinewood = CreatePickup(1276,2,1378.1597,-807.1733,85.0415,-1);
DestroyPickup(vulkan);
Cause I think that when you destroy it, a free pickupid gets available, and you create a new pickup that uses the destroyed pickup's id.. :P