a guest Nov 8th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:ofgivemoney(playerid, params[])
  2. {
  3.     new string[100];
  4.     if(PlayerInfo[playerid][pAdmin] < 4) return send(playerid, col_grad1, "{AFAFAF}У вас нет прав на использование данной команды.");
  5.     new query[100];
  6.     new playergive;
  7.     new givemoney;
  8.     if(sscanf(params, "s[24]d", playergive, givemoney)) return send(playerid, col_grad2, "Используйте: /ofgivemoney [полный ник игрока] [Сумма]");
  9.     if(IsPlayerConnected(playergive)) return send(playerid, col_grad2, "Игрок онлайн, используйте /givemoney.");
  10.     format(string, sizeof(string), "A offline: Администратор %s выдал %d $ игроку %s.", PlayerName(playerid), givemoney, playergive); ABroadCast(col_lred, string, 1); //getpl(params[0]), params[0], getpl(playerid)); ABroadCast(col_lred, string, 1);
  11.     mysql_format(ServerDB, query, sizeof(query), "UPDATE `users` SET `money` = `money` + '%d' WHERE `name` = '%s'", givemoney, playergive);
  12.     mysql_tquery(ServerDB, query, "FindPlayerInTable", "s", playergive);
  13.     return 1;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand