Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setyt(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
- new id,string[180], lvl;
- if(sscanf(params, "ui",id, lvl)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: {FFFFFF}/setyt <playerid/name> <level (0/1)>");
- if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Acel player nu este conectat.");
- if(lvl > 0) {
- PlayerInfo[id][pYT] = 1;
- format(string, sizeof(string), "Ai fost promovat ca YouTuber de %s.", GetName(playerid));
- SendClientMessage(id, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "L-ai promovat pe %s ca YouTuber.", GetName(id));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- else {
- PlayerInfo[id][pYT] = 0;
- format(string, sizeof(string), "Ai fost scos din functia de YouTuber de %s.", GetName(playerid));
- SendClientMessage(id, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "L-ai scos pe %s din functia de YouTuber.", GetName(id));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- format(string, sizeof(string), "STAFF: %s i-a setat lui %s functia de YouTuber.", GetName(playerid),GetName(id));
- if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,4);
- new query[128];
- format(query,sizeof(query),"UPDATE users SET `Youtuber`='%d' WHERE `ID`='%d'",PlayerInfo[id][pYT],PlayerInfo[id][pSQLID]);
- mysql_query(SQL,query);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement