hi,
ich weiß nicht was da falsch sein könnte aber wenn ich ein spieler heilen will kann ich den heilen egal wo er ist:
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 255)
{
if(location < 255)
{
if(HouseInfo[location][hArm] == 1)
{
format(string, sizeof(string), "* %s legt die Schutzweste an.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
FreezePlayer(playerid);
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
SetPlayerPos(playerid,1527.5,-12.1,1002.0);
PlayerInfo[playerid][pLocal] = 255;
SetPlayerInterior(playerid,99);
Spectate[playerid] = 257;
}
else
{
format(string, sizeof(string), "Dieser Ort hat keine Upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Du wurdest wieder zu 100% geheilt.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"Du wurdest wieder zu 100% geheilt.");
}
}
else
{
format(string, sizeof(string), "Dieser Ort ist nicht zum Healing Upgrade.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
return 1;
}
was muss ich ändern?
danke im voraus