Need help about respect system.. -
Hello and good morning.
I want to know how to make /giveresect system.
if player says "/giverespect [player id]" it gives player +1 respect point.. How to do that?
And one more thing how can I make PlayerInArea but in my script PenInArea it's only a example
Код:
public PenInArea()
{
new Float:x, Float:y, Float:z;
if(gPublicEnemy != 255)
{
GetPlayerPos(gPublicEnemy, x, y, z);
if(z>900.0)
{
new house = PlayerInfo[gPublicEnemy][pLocal];
GameTextForPlayer(gPublicEnemy, "~w~There is nowhere to hide", 5000, 1);
SetPlayerInterior(gPublicEnemy,0);
PlayerInfo[gPublicEnemy][pInt] = 0;
PlayerInfo[gPublicEnemy][pLocal] = 255;
if(house > 99 && house != 255)
{
SetPlayerPos(gPublicEnemy, BizzInfo[house-99][bEntrancex], BizzInfo[house-99][bEntrancey],BizzInfo[house-99][bEntrancez]); // Warp the player
}
else if(house < 99 && house != 255)
{
SetPlayerPos(gPublicEnemy, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); // Warp the player
}
else
{
SetPlayerPos(gPublicEnemy, 1350.1,-1279.1,13.3); // Warp the player to amunation
}
}
if(z <= -0.5)
{
GameTextForPlayer(gPublicEnemy, "~w~Public Enemy Can Not Swim", 5000, 1);
SetPlayerHealth(gPublicEnemy,0.0);
}
if(x == PenPos[0] && y == PenPos[1] && z == PenPos[2])
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == 2 && CrimInRange(5.0, gPublicEnemy,i))
{
SetPlayerHealth(gPublicEnemy, 0.0);
OnPlayerDeath(gPublicEnemy, i, 0);
}
}
}
PenPos[0] = x ;PenPos[1]= y;PenPos[2]= z;
}
return 1;
}
I need just to add a player message when he is in the zone "This is blablabla territory".