24.04.2013, 16:44
pawn Код:
if(strcmp(cmd, "/depositar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pMember] == 5)
{
if(!strval(tmp)) return SendClientMessage(playerid, GetPlayerColor(playerid), "Use /depositar [dinheiro].");
if(strval(tmp) > GetPlayerMoney(playerid)) return SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo tem essa quantia");
if(PlayerToPoint(Radioballas, playerid, LugarCofreballas)){
format(string, sizeof(string), "Vocк depositou: %d.", strval(tmp));
SendClientMessage(playerid, GetPlayerColor(playerid), string);
Cofreballas += strval(tmp);
GivePlayerMoney(playerid,-strval(tmp));
dini_IntSet("Cofreballas.ini","Cofreballas",Cofreballas);
} else SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo esta perto do cofre");
}
return 1;
}
if(strcmp(cmd, "/sacar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pLeader] == 5)
{
if(!strval(tmp)) return SendClientMessage(playerid, GetPlayerColor(playerid), "Use /sacar [dinheiro].");
if(strval(tmp) > Cofreballas) return SendClientMessage(playerid, GetPlayerColor(playerid), "O banco nao tem isso tudo");
if(PlayerToPoint(Radioballas, playerid, LugarCofreballas)){
format(string, sizeof(string), "Vocк Sacou: %d.", strval(tmp));
SendClientMessage(playerid, GetPlayerColor(playerid), string);
Cofreballas -= strval(tmp);
GivePlayerMoney(playerid,strval(tmp));
dini_IntSet("Cofreballas.ini","Cofreballas",Cofreballas);
}else SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo esta perto do cofre");
}
return 1;
}