09.06.2012, 14:00
Hi there,
I have little problem with GameTextForPlayer, when player pickup some pickup it should show GameText of pickup, it works fine when i call it in OnPlayerPickUpPickup, but when i call it from OnPlayerPickUpDynamicPickup, it doesn't show text, as you can see in code i print some of information's i need, and in Dynamic call back it prints good in console, but i won't show gametext.
Here is code:
I have little problem with GameTextForPlayer, when player pickup some pickup it should show GameText of pickup, it works fine when i call it in OnPlayerPickUpPickup, but when i call it from OnPlayerPickUpDynamicPickup, it doesn't show text, as you can see in code i print some of information's i need, and in Dynamic call back it prints good in console, but i won't show gametext.
Here is code:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid){
for(new i = 1; i < sizeof(ePickupInfo); i++){
if(pickupid == ePickupInfo[i][epPID]){
printf("%d %d %d, %s", pickupid, ePickupInfo[i][epPID], ePickupInfo[i][epSQLID], ePickupInfo[i][epDiscription]);
format(globalstring, sizeof(globalstring), "%s", ePickupInfo[i][epDiscription]);
return GameTextForPlayer(playerid, globalstring, 3000, 5);
}
}
return true;
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i = 1; i < sizeof(ePickupInfo); i++){
if(pickupid == ePickupInfo[i][epPID]){
printf("%d %d %d, %s", pickupid, ePickupInfo[i][epPID], ePickupInfo[i][epSQLID], ePickupInfo[i][epDiscription]);
format(globalstring, sizeof(globalstring), "%s", ePickupInfo[i][epDiscription]);
return GameTextForPlayer(playerid, globalstring, 3000, 5);
}
}
return 1;
}