Ко всем командам
Код
if(strcmp(cmd, "/money", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_GRAD2, "Используй /money [id игрока]");
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
format(query, sizeof(query), "{B4B5B7}Денег на руках: %d$\nДенег в банке: %d$\n\nВсего: %d$",PlayerInfo[giveplayerid][pMoney],PlayerInfo[giveplayerid][pBank],PlayerInfo[giveplayerid][pMoney]+PlayerInfo[giveplayerid][pBank]);
ShowPlayerDialog(playerid,27,DIALOG_STYLE_MSGBOX,PlayerInfo[giveplayerid][pName],query,"Закрыть","");
return true;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[{FF0000}Error{B4B5B7}] Неверный id.");
}
}
return true;
}