Why wont this command work ? :S
#1

Hello, i made this command here i realy thought it would work but it isnt doing anything.
Can anyone help me please ?
Im making more commands like this, that a player who use a command has to check if another player is near
i just need to know how to check the other player and use it in a correct way.

Код:
  if(!strcmp(cmdtext, "/rape", true))
	{
	new kidnapvehicle;
	kidnapvehicle = GetPlayerVehicleID(playerid);
	new playername[MAX_PLAYER_NAME];
 	GetPlayerName(playerid,playername,sizeof(playername));
 	new tmp[64];
	new victimname[16];
 	new victim;
	victim = strval(tmp);
	GetPlayerName(victim, victimname, sizeof(victimname));
	if(GetDistanceBetweenPlayers(playerid,victim) < 4 )
	{
	SetPlayerHealth(victim, 9);
	SendClientMessage(victim,COLOR_RED,"You have been raped");
	}
	if(IsPlayerInVehicle(victim, kidnapvehicle))
	{
  SetPlayerHealth(victim, 9);
	SendClientMessage(victim,COLOR_RED,"You have been raped");
	}
	return 1;
	}
Reply


Messages In This Thread
Why wont this command work ? :S - by boelie - 13.02.2010, 19:58
Re: Why wont this command work ? :S - by dice7 - 13.02.2010, 21:19
Re: Why wont this command work ? :S - by mansonh - 13.02.2010, 22:00
Re: Why wont this command work ? :S - by woot - 13.02.2010, 22:02
Re: Why wont this command work ? :S - by mansonh - 13.02.2010, 22:10
Re: Why wont this command work ? :S - by boelie - 13.02.2010, 22:14
Re: Why wont this command work ? :S - by NewYorkRP - 13.02.2010, 22:31
Re: Why wont this command work ? :S - by boelie - 13.02.2010, 22:40

Forum Jump:


Users browsing this thread: 2 Guest(s)