OnPlayerPickupPickup doesn't display gametext when picking it up. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerPickupPickup doesn't display gametext when picking it up. (
/showthread.php?tid=191159)
OnPlayerPickupPickup doesn't display gametext when picking it up. -
Haydz - 18.11.2010
Ok, i'v got this code but when you enter the pickup it doesn't display the gametext of the owners/price/sell price etc,
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid)
{
for(new C; C<BusinessCount+1; C++)
{
if(pickupid == BusinessPickup[C])
{
new str[150];
if(BusinessInfo[C][BusOwner] == -1) format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn]);
if(BusinessInfo[C][BusOwner] != -1)
{
new Pname[24];
GetPlayerName(BusinessInfo[C][BusOwner], Pname, 24);
format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d~n~~w~Owner: %s(%d)", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn], Pname, BusinessInfo[C][BusOwner]);
GameTextForPlayer(playerid, str, 3000, 3);
}
}
}
return 1;
}
thanks for all help.
Re: OnPlayerPickupPickup doesn't display gametext when picking it up. -
Lorenc_ - 18.11.2010
Show the code where you created the pickup, eg Addstaticpickup....