OnPlayerPickUpPickup pickupid always 0 -
dusk - 15.08.2013
How come under OnPlayerPickUpPickup "pickupid" is always 0? I tried picking two different pickups, one of them had to have an ID thats not 0.
Re: CreatePickup doesn't return pickup ID -
dusk - 16.08.2013
Bump
Re: CreatePickup doesn't return pickup ID -
Ballu Miaa - 16.08.2013
The first pickup ID is always Zero (0) and it increments its value once more pickups are created. Try to create more business and their pickups , check their id's. I am sure they wont be the same.
Re: CreatePickup doesn't return pickup ID -
dusk - 16.08.2013
Okay...Thanks for that.
But i got another problem: how come under OnPlayerPickUpPickup "pickupid" is always 0? I tried picking two different pickups, one of them had to have an ID thats not 0.
Re: CreatePickup doesn't return pickup ID -
dusk - 17.08.2013
bump
Re: CreatePickup doesn't return pickup ID -
Admigo - 17.08.2013
Did you have added counter++; in your code?
Re: CreatePickup doesn't return pickup ID -
dusk - 17.08.2013
Well i did, but that's not the problem anymore... It is in the message before "bump" ill update my first post
Re: CreatePickup doesn't return pickup ID -
dusk - 18.08.2013
Bump
Re: CreatePickup doesn't return pickup ID -
-Prodigy- - 18.08.2013
Show the code where you create the pickups
Re: CreatePickup doesn't return pickup ID -
dusk - 18.08.2013
pawn Код:
stock LoadBiznius()
{
new query[170],counter,string[100],ticks = GetTickCount();
mysql_query("SELECT * FROM verslai");
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
sscanf(query,"p<|>e<ds[24]s[51]fffdddd>",bInfo[counter]);
bInfo[counter][BussinessPickup] = CreatePickup(1314,1,bInfo[counter][bpX],bInfo[counter][bpY],bInfo[counter][bpZ],0);
printf("Pickupid while loading:%d",bInfo[counter][BussinessPickup]);
if(bInfo[counter][Nupirktas] == 1) format(string,sizeof(string),"%s\nSavininkas: %s",bInfo[counter][bPavadinimas],bInfo[counter][Savininkas]);
else format(string,sizeof(string),"Verslo pavadinimas: %s\nVerslas parduodamas\nVerslo kaina: %d$",bInfo[counter][bPavadinimas],bInfo[counter][Kaina]);
bInfo[counter][Bussiness3D] = Create3DTextLabel(string,BIZ_COLOR,bInfo[counter][bpX],bInfo[counter][bpY],bInfo[counter][bpZ],10.0,0,1);
counter++;
}
printf("[VERSLAI]Pakrauti %d verslai. Krovimo trukme:%d MS",mysql_num_rows(), GetTickCount() - ticks);
mysql_free_result();
return 1;
}
And the prints from above:
pawn Код:
[19:35:23] Pickupid while loading:0
[19:35:23] Pickupid while loading:1
[19:35:23] Pickupid while loading:2