Quote:
Originally Posted by Micko123
PHP код:
hook OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == pizzaCheckpoint[playerid])
{
if(IsPlayerAttachedObjectSlotUsed(playerid, PIZZA_INDEX))
{
new string[126], earning = 5 + random(5);
pizzaEarnings[playerid] += earning;
if(pizzaDeliveryTimeLeft[playerid] > 0)
{
pizzaDeliveryTimeLeft[playerid] = 0;
KillTimer(pizzaDeliveryTimer[playerid]);
new tips = 1 + random(MAX_TIP);
pizzaTips[playerid] += tips;
PlayerTextDrawHide(playerid, pizzaTextDraw5[playerid]);
PlayerTextDrawHide(playerid, pizzaTextDraw7[playerid]);
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
}
ClearAnimations(playerid);
DestroyDynamicCP(pizzaCheckpoint[playerid]);
}
else
{
SendClientMessage(playerid, -1, "Here goes your message");
return 1;
}
}
return 1;
}
|
The checkpoint still dissappears when I enter it and the text is showed.