Salut, am incercat sa fac o comanda care sa dea jucatorilor din apropierea celui care a scris comanda, heal. Dar nu stiu cum sa fac sa dea heal doar celor de langa el , eu am incercat asa
[pawn]if(strcmp(cmdtext, "/healx", true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 7.0, x, y, z))
{
SendClientMessageToAll(-1, "Cei in apropiere ati primit heal");
Question
RobertN
Salut, am incercat sa fac o comanda care sa dea jucatorilor din apropierea celui care a scris comanda, heal. Dar nu stiu cum sa fac sa dea heal doar celor de langa el , eu am incercat asa
[pawn]if(strcmp(cmdtext, "/healx", true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 7.0, x, y, z))
{
SendClientMessageToAll(-1, "Cei in apropiere ati primit heal");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i, 100);
}
}
}
return 1;
}[/pawn]
<3 FCP 3>
9 answers to this question
Recommended Posts