13.02.2010, 19:58
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.
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; }