Sex Command Help
#1

Код:
	if(strcmp(cmd, "/sex", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sex [playerid/PartOfName]");
			return 1;
		}
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "   You have to be a passenger of a car, who else is gonna drive?");
			return 1;
		}
		new target = strval(tmp);
		if (target == playerid)
		{
			SendClientMessage(target, COLOR_GRAD1, "	You cant have sex with yourself... well you can but...");
			return 1;
		}
		new playa;
		new Float:shealth;
		if(IsStringAName(tmp))
		{
			playa = GetPlayerID(tmp);
		}
		else
		{
			playa = strval(tmp);
		}
		GetPlayerName(playa, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
		{
			GetPlayerHealth(playa, shealth);
            SetPlayerHealth(playa, shealth+5);
			GiveMoney(playa, -20); // take money from
			GiveMoney(playerid, 20); // take money from hooker
			SendClientMessage(playa, COLOR_GRAD1, "	She's giving you so much pleasure you blow +5hp");
			SendClientMessage(playerid, COLOR_GRAD1, "	His dick feels good...");
	    	format(string, sizeof(string), "%s is having hot sex with %s", giveplayer, sendername);
			ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
		return 1;
	}
How can I set either a team requirement for this command, distance requirement, or setting max HP as 150?
Reply


Messages In This Thread
Sex Command Help - by silentmemory - 29.07.2010, 16:30
Re: Sex Command Help - by Fab10 - 29.07.2010, 16:56
Re: Sex Command Help - by John_F - 29.07.2010, 17:13

Forum Jump:


Users browsing this thread: 1 Guest(s)