14.07.2012, 15:52
I didnt get you guyz ... Can you make it more clearer
Here is the pawn code where the problem is :
Here is the pawn code where the problem is :
PHP код:
//=================================Phone stuff==================================
timer PhoneCut[1000]()
{
for (new i = 0; i < GetMaxPlayers(); i++)
{
if (Calling[i] > -1 && Answered[i] == 1 && Callerid[i] == 1)
{
if (GetPlayerCash(i) >= CALL_UNIT_COST)
{
GivePlayerCash(i, -CALL_UNIT_COST);
}
if (GetPlayerCash(i) < CALL_UNIT_COST)
{
Inter_SendClientMessage(i, COLOR_BRIGHTRED, "CUT OFF: You don't have enough cash to continue this call");
Inter_SendClientMessage(Calling[i], COLOR_BRIGHTRED, "CUT OFF: Your recipient's phone has been cut off due to lack of credit");
SetPlayerSpecialAction(Calling[i],SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(Calling[i], 4);
Calling[Calling[i]] = -1;
Answered[Calling[i]] = 0;
SetPlayerSpecialAction(i,SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(i, 4);
Calling[i] = -1;
Answered[i] = 0;
Callerid[i] = 0;
}
}
}
return 1;
}

