Some problems at /rape command with "condoms"
#1

Код:
  if(strcmp(cmd, "/rape", true) == 0) {
  if(IsSpawned[playerid] == 0) {
	SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
  return 1;
  }
  if(cuffed[playerid] == 1) {
  SendClientMessage(playerid,COLOR_ERROR,"You are handcuffed. You cannot use this command");
  return 1;
  }
  if(Jailed[playerid] == 1) {
  SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command in jail");
  return 1;
  }
  if(gTeam[playerid] == TEAM_COP) {
  SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rape people");
  return 1;
  }
  if(gTeam[playerid] == TEAM_ARMY) {
  SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rape people");
  return 1;
  }
  if(gTeam[playerid] == TEAM_CASSEC) {
  SendClientMessage(playerid,COLOR_ERROR,"Casino Security agents cannot rape people");
  return 1;
  }
  if(gTeam[playerid] == TEAM_MEDIC) {
  SendClientMessage(playerid,COLOR_ERROR,"Medics cannot rape people");
  return 1;
  }
  if(gTeam[playerid] == TEAM_JAILTK) {
  SendClientMessage(playerid,COLOR_ERROR,"Jail Turnkeys cannot rape people");
  return 1;
  }
  if(RapedPlyRecent[playerid] == 1) {
  SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
  return 1;
  }
	if(isKidnapped[playerid] == 1) {
	SendClientMessage(playerid, COLOR_ERROR, "You are tied up! You cannot rape anyone.");
	return 1;
	}
  if(InBank[playerid] == 1) {
  SendClientMessage(playerid, COLOR_ERROR, "You cannot rape a player inside the bank");
  return 1;
  }
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rape (id)");
  return 1;
  }
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rape (id) ID Must be a number");
  return 1;
  }
  if(strval(tmp) == playerid) {
  SendClientMessage(playerid, COLOR_ERROR, "You cannot rape yourself unless you pull your penis to your ass cheeks.");
  return 1;
  }
  giveplayerid = strval(tmp);
  if(!IsPlayerConnected(giveplayerid)) {
  format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  
  new rapername[24];
  new victimname[24];
  GetPlayerName(playerid,rapername, 24);
	GetPlayerName(giveplayerid, victimname, 24);
	
  if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 2) {
	format(string, sizeof(string), "%s(%d) Is not close enough. You cannot rape that player",victimname,giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  if(Jailed[giveplayerid] == 1) {
  format(string, sizeof(string), "%s(%d) Is in jail. You cannot rape a prisoner",victimname,giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  if(cuffed[giveplayerid] == 1) {
  format(string, sizeof(string), "%s(%d) Is handcuffed. You cannot rob a player who is handcuffed",victimname,giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  if(IsPlayerInAnyVehicle(giveplayerid)) {
  format(string, sizeof(string), "%s(%d) Is in a vehicle. You cannot rape that player",victimname,giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  new Float:victimhealth;
  GetPlayerHealth(giveplayerid,victimhealth);
	if(IsSpawned[giveplayerid] == 0) {
	new plwl = GetPlayerWantedLevel(playerid);
	new pcol = GetPlayerColor(playerid);
  SetPlayerWantedLevel(playerid,plwl +1);
	format(string, sizeof(string), "%s(%d) Has raped %s(%d)'s dead, rotting corpse",rapername,playerid,victimname,giveplayerid);
	SendClientMessageToAll(0xB22222AA, string);
	ircSay(EchoConnection, EchoChan,string);
	SpamStrings[playerid] ++;
	if(condom[playerid] == 1) { //THE LINES
	SendClientMessage(playerid, COLOR_ERROR, "You raped player with condom. He's not infected. "); //THE LINES
	SendClientMessage(giveplayerid, COLOR_ERROR, "Someone attempted to rape you but failed because of condom.");//THE LINES
	condom[playerid] = 0;//THE LINES

	}
	if(Chlamydia[playerid] == 0) {
	format(string, sizeof(string), "%s(%d) Has been infected with Chlamydia",rapername,playerid);
  SendClientMessageToAll(0x00C7FFAA, string);
  Chlamydia[playerid] =1;
  }
  SendClientMessage(playerid, 0xA9A9A9AA, "|_Rape Complete_|");
  format(string, sizeof(string), "You have raped %s(%d)'s dead body", victimname,giveplayerid);
  SendClientMessage(playerid,0x00C7FFAA,string);
  plwl = GetPlayerWantedLevel(playerid);
	SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
	format(string, sizeof(string), "(CORPSE RAPE) Wanted Level %d",plwl);
	SendClientMessage(playerid,pcol,string);
	return 1;
  }
  if(gTeam[playerid] == TEAM_RAPIST && victimhealth <=25) {
  SetPlayerHealth(giveplayerid,0);
  oscore = GetPlayerScore(playerid);
	SetPlayerScore(playerid, oscore +1);
  format(string, sizeof(string), "%s(%d) Has been raped to death by rapist %s(%d)",victimname,giveplayerid,rapername,playerid);
  SendClientMessageToAll(0xB22222AA, string);
  ircSay(EchoConnection, EchoChan,string);
  new plwl = GetPlayerWantedLevel(playerid);
	new pcol = GetPlayerColor(playerid);
  SetPlayerWantedLevel(playerid,plwl +10);
  plwl = GetPlayerWantedLevel(playerid);
  SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
	format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
	SendClientMessage(playerid,pcol,string);
	format(string, sizeof(string), "~r~RAPED TO DEATH BY~n~~w~%s(%d)",rapername,playerid);
  GameTextForPlayer(giveplayerid,string,5000,3);
  new current_zone;
  current_zone = player_zone[playerid];
  for(new i=0;i<MAX_PLAYERS;i++)
	{
  if(LawEnforcementRadio[i] == 1) {
  format(string, sizeof(string), "DISPATCH: (MURDER) Suspect: %s(%d) has murdered %s(%d) Location: %s",rapername,playerid,victimname,giveplayerid,zones[current_zone][zone_name]);
  SendClientMessage(i,COLOR_ROYALBLUE,string);
  SendClientMessage(i,COLOR_ROYALBLUE,"DISPATCH: All units in the area respond");
  }
  }
  return 1;
  }
and this is the condom :

Код:
	if(condom[playerid] == 1) {
	SendClientMessage(playerid, COLOR_ERROR, "You raped player with condom. He's not infected. ");
	SendClientMessage(giveplayerid, COLOR_ERROR, "Someone attempted to rape you but failed because of condom.");
	condom[playerid] = 0;
I want to make that player dosen't get infected with Chlamydia
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)