30.07.2010, 19:23
fijate si ahora te funciona
tenias unas cuantas cosas de mas xD
pawn Код:
if(!strcmp(cmd, "/sacar", true))
{
if(IsPlayerConnected(playerid))
/*para que queres que cheque si el jugador esta conectado, cuando fue este jugador el que tipeo
el comando. ===>> if inutil, siempre dara positivo*/
{
if(!IsAtATM(playerid))
{
if(!PlayerToPoint(20.0, playerid, 2308.6555,-14.7076,26.7422))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "COMANDO: /sacar [Cantidad]");
format(string, sizeof(string), " Tienes $%d en tu cuenta.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " No tienes esa Cantidad");
return 1;
}
SafeGivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Has extraido $%d de tu Cuenta. Te Quedan: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Realiza una Tranzaccion en su cuenta bancaria.", sendername);
//creo que te falto mandar el ultimo mensaje del format que esta arriba de este comentario
}
else SendClientMessage(playerid, COLOR_GREY,"Destination is too far.");
return 1;
}
}

