All pastes #260476 Raw Edit

Something

public text v1 · immutable
#260476 ·published 2006-11-28 12:29 UTC
rendered paste body
        if (strcmp(cmd, "/wanted", true)==0)
        {
            if (gTeam[playerid] == TEAM_COP) {
                        cmd = strtok(cmdtext,idx);
                        if (!strlen(cmd)) {
                            SendClientMessage(playerid, 0xFFFF00FF, "* Syntax: /wanted <playerid>");
                            return 1;
                        }
                        pid = strval(cmd);

                        if (IsPlayerConnected(pid)) {
                            if (gWanted[pid]) {
                                SendClientMessage(playerid, 0xFFFF00FF, "* This player is already wanted!");
                            } else {
                                    if (IsPlayerInAnyVehicle(playerid)) {
									SetPlayerColor(playerid,COLOR_INVISIBLE); // invisible
                                    }
    								SetPlayerColor(playerid,COLOR_INVISIBLE); // invisible
                                    gWanted[pid] = true;
                                }
                        } else {
                            SendClientMessage(playerid, 0xFFFF00FF, "* This is not an active player!");
                        }
                } else {
                    SendClientMessage(playerid, 0xFFFF00FF, "* You are not a police officer!");
                }

            return 1;
        }
        
                if (strcmp(cmd, "/unwanted", true)==0)
        {
            if (gTeam[playerid] == TEAM_COP) {
                        cmd = strtok(cmdtext,idx);
                        if (!strlen(cmd)) {
                            SendClientMessage(playerid, 0xFFFF00FF, "* Syntax: /unwanted <playerid>");
                            return 1;
                        }
                        pid = strval(cmd);

                        if (IsPlayerConnected(pid)) {
                            if (!gWanted[pid]) {
                                SendClientMessage(playerid, 0xFFFF00FF, "* This player is not wanted!");
                            } else {
                                    if (IsPlayerInAnyVehicle(playerid)) {
    								SetPlayerColor(playerid,COLOR_WHITE);
                                    }
    								SetPlayerColor(playerid,COLOR_WHITE);
                                    gWanted[pid] = false;
                                }
                        } else {
                            SendClientMessage(playerid, 0xFFFF00FF, "* This is not an active player!");
                        }
                } else {
                    SendClientMessage(playerid, 0xFFFF00FF, "* You are not a police officer!");
                }

            return 1;
        }
     // funker ikke
if(strcmp(cmd, "/list", true) == 0)
{
	if (gTeam[playerid] == TEAM_CIVILLIAN || gTeam[playerid] == TEAM_CNN || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_MILITARY) {SendPlayerFormattedText(playerid,"This command is for officers only",0); return 1;
	}else {
			for(new i=0; i<MAX_PLAYERS; i++)	{
if(IsPlayerConnected(i)){
if (gWanted[pid]) {
new name[MAX_PLAYER_NAME];
new stringg[256];
GetPlayerName(playerid, name, sizeof(name));
format(stringg, sizeof(stringg), "Wanted: %s %s",gWanted, name);
SendClientMessage(playerid,COLOR_YELLOW,stringg);
				}
				}
			}
	}
		return 1;
}