Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/declareawesome", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /declareawesome [playerid/PartOfName] [reason]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[96];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /declareawesome [playerid/PartOfName] [reason]");
- return 1;
- GetPlayerIp(playerid, IP, sizeof(IP));
- format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s Reason: Spam.", IP, day, month, year,sendername,PlayerInfo[playerid][pKey]);
- BanLog(logstring);
- format(string, sizeof(string), "AdmCmd: %s was banned, reason: Spam.", sendername);
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- PlayerInfo[playerid][pBand] = 3;
- PlayerInfo[playerid][pPermBand] = 1;
- BanEx(playerid, "Banned By: Autoban Reason: Spam");
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- GetPlayerIp(playerid, IP, sizeof(IP));
- format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s Reason: no awesome mang.", IP, day, month, year,sendername,PlayerInfo[playerid][pKey]);
- BanLog(logstring);
- format(string, sizeof(string), "AdmCmd: %s is Awesome, reason: Attempting to make another admin Awesome.", sendername);
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- PlayerInfo[playerid][pBand] = 3;
- PlayerInfo[playerid][pPermBand] = 1;
- BanEx(playerid, "LOOOOL BRIAN WRIGHT IS COOL GUY!");
- return 1;
- }
- GetPlayerIp(giveplayerid, IP, sizeof(IP));
- format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s is cool mang: %s Reason: %s", IP, day, month, year,giveplayer,PlayerInfo[giveplayerid][pKey], sendername, (result));
- BanLog(logstring);
- format(string, sizeof(string), "AdmCmd: %s was trolled by %s, reason: %s", giveplayer, sendername, (result));
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- PlayerInfo[giveplayerid][pBand] = 3;
- format(banstring, sizeof(banstring), "lol By: %s Reason: %s", sendername, (result)); //modified
- BanEx(giveplayerid, banstring); //modified
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("UseAdmCmd",3*1000,0,"i",playerid); //3 seconds
- return 1;
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player !", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use that command !");
- }
- }
- return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement