Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new ckStatus[MAX_PLAYERS] = 0;
- if(strcmp(cmd, "/characterkill", true) == 0 || strcmp(cmd, "/ck, true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_GRAD1, "USAGE: (/ck)/characterkill [PlayerName/ID]");
- new ckPlayer;
- ckPlayer = ReturnUser(tmp);
- if(GetDistanceBetweenPlayers(playerid, HealedPlayer) < 15)
- {
- if(ckPlayer != INVALID_PLAYER_ID)
- {
- new ckMSG[128];
- new ckMSG2[128];
- format(ckMSG, sizeof(ckMSG), "You have set a Character Kill on [%d]%s", ckPlayer, GetPlayerNameEx(ckPlayer));
- SendClientMessage(playerid, COLOR_LIGHTGREEN, ckMSG);
- format(ckMSG2, sizeof(ckMSG2), "[%d]%s requested your approval on your Character Kill",playerid, GetPlayerNameEx(playerid))
- SendClientMessage(ckPlayer, COLOR_ADMINCMD, ckMSG2);
- SendClientMessage(ckPlayer, COLOR_LIGHTBLUE, "type: (/ack)/acceptcharacterkill to Accept the CK or (/dck)/declinecharacterkill to Decline a CK");
- ckStatus[ckPlayer] = 1;
- return 1;
- }
- else{ SendClientMessage(playerid, COLOR_GRAD, "Invalid PlayerName/ID"); return 1; }
- }
- else{ SendClientMessage(playerid, COLOR_GRAD, "You are too far away from that person"); return 1; }
- }
- }
- if(strcmp(cmd, "/acceptcharacterkill", true) == 0 || strcmp(cmd, "/ack", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(ckStatus[playerid] == 1)
- {
- PlayerInfo[playerid][pCK] = 1;
- SendClientMessage(playerid, COLOR_ADMINCMD, "You have been Character Killed");
- SendClientMessage(playerid, COLOR_GRAD2, "You no longer can play on this Character, Make a new one please");
- Kick(playerid);
- ckStatus[playerid] = 0;
- return 1;
- }
- else{ SendClientMessage(playerid, COLOR_GRAD, "You don't have any Character Kill requests"); return 1; }
- }
- }
- if(strcmp(cmd, "/declinecharacterkill", true) == 0 || strcmp(cmd, "/dck", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(ckStatus[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_ADMINCMD, "You have Declined the Character Kill");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment