Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ЗА МЕСТО КОМАНДЫ /giverub
- CMD:giverub(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return true;
- new name[24], count_rub, string[100];
- if(sscanf(params, "s[24]d",name, count_rub)) return SendClientMessage(playerid, COLOR_WHITE, "• {FFC800}[Подсказка] {ffffff} /giverub [НИК] [КОЛ-ВО РУБЛЕЙ]");
- new player_id = INVALID_PLAYER_ID;
- sscanf(name, "i", player_id);
- mysql_format(connects, string, sizeof(string), "SELECT * FROM `accounts` WHERE `Name`= '%s'", name);
- mysql_tquery(connects, string, "GiveOffDonate", "dsdd",playerid,name,count_rub, player_id);
- return true;
- }
- В КОНЕЦ МОДА
- publics: GiveOffDonate(playerid,name[], rub, tmpid)
- {
- new string[384];
- new rows,fields;
- cache_get_data(rows, fields);
- if(!rows)
- {
- SCMF(playerid, COLOR_BLUE, "Аккаунт %s не существует", name);
- }
- else
- {
- SCMF(playerid, COLOR_BLUE, "Выданы рубли игроку %s", name);
- if(tmpid != -1)
- {
- SCM(tmpid, COLOR_BLUE, "Вам выданы рубли. Перезайдите на сервер для их получения.");
- }
- mysql_format(connects, string, MAX_SQL, "UPDATE `accounts` SET `pRub`= `pRub` + '%d' WHERE `Name`='%s'",rub, name);
- mysql_empty(connects, string);
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement