Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:live(playerid, params[])
- {
- new id, szPlayerName2[MAX_PLAYER_NAME];
- if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /live <playerid>");
- if(playerVariables[playerid][pGroup] == 3)
- {
- if(id != INVALID_PLAYER_ID)
- {
- if(id != playerid)
- {
- if(playerVariables[id][pLive] == 0)
- {
- if(IsPlayerInRangeOfPlayer(playerid, id, 10.0))
- {
- if(playerVariables[id][pGroup] != 3)
- {
- playerVariables[playerid][pLive] = 1;
- playerVariables[id][pLive] = 1;
- GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
- GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);
- format(szMessage, sizeof(szMessage), "You have started the interview with %s.", szPlayerName2);
- SCM(playerid, COLOR_LIGHTBLUE, szMessage);
- format(szMessage, sizeof(szMessage), "%s has started the interview with you.", szPlayerName);
- SCM(id, COLOR_LIGHTBLUE, szMessage);
- }
- else
- {
- SCM(playerid, -1, "This player is a reporter!");
- }
- }
- else
- {
- SCM(playerid, -1, "You are not below the player you wish to start the interview with!");
- }
- }
- return 1;
- }
- CMD:endlive(playerid, params[])
- {
- new id, szPlayerName2[MAX_PLAYER_NAME];
- if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /live <playerid>");
- if(playerVariables[playerid][pGroup] == 3)
- {
- playerVariables[id][pLive] = 0;
- GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
- GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);
- format(szMessage, sizeof(szMessage), "You have finished the interview with %s.", szPlayerName2);
- SCM(playerid, COLOR_LIGHTBLUE, szMessage);
- format(szMessage, sizeof(szMessage), "%s has finished the interview with you.", szPlayerName);
- SCM(id, COLOR_LIGHTBLUE, szMessage);
- }
- }
- }
- else
- {
- SCM(playerid, -1, "The player you wish to start the interview with is not connected!");
- }
- }
- else
- {
- SCM(playerid, -1, "You are not a reporter!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment