30.07.2010, 01:40
Hola tengo un comando que no estoy cerrando bien y me vota 26 errores asi que aki esta para que alguien ojala pueda ayudarme a cerrarlo bien.
pawn Код:
if(!strcmp(cmd, "/sacar", true))
{
if(IsPlayerConnected(playerid))
{
if(!IsAtATM(playerid))
{
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(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sacar [amount]");
format(string, sizeof(string), " Tienes $%d en tu cuenta.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " No tienes esa Cantidad");
return 1;
}
//ConsumingMoney[playerid] = 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);
}
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;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sacar [amount]");
format(string, sizeof(string), " Tienes $%d en tu cuenta.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " No tienes esa Cantidad");
return 1;
}
//ConsumingMoney[playerid] = 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);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }
{
return 1;
}
}