11.04.2011, 21:51
Okay ive tryed making so you can use this command near a ATM (object 2942), and i can't see anything wrong and there is no warnings or errors. It all works, just when i go to the atm it keeps giving me the "Message3" even tho im near it. So i guess i did something wrong. But what?
pawn Код:
command(awithdraw, playerid, params[])
{
new Amount, string[ 128 ], Float:X, Float:Y, Float:Z;
if( sscanf( params, "d", Amount) )
{
SendClientMessage( playerid, WHITE, "Message1" );
}
else
{
if(Amount < 1)
{
}
else
{
GetObjectPos(2942, X, Y, Z);
if(IsPlayerInRangeOfPoint( playerid, 5.0, X, Y, Z) )
{
if(Amount > Player[playerid][BankMoney])
{
SendClientMessage( playerid, WHITE, "Message2" );
}
else
{
SendClientMessage( playerid, WHITE, "It Works." );
}
}
else
{
SendClientMessage( playerid, WHITE, "Message3" );
}
}
}
return 1;
}