14.02.2019, 14:17
I want to send those two messages when a player near the houses and I tried this it didn't work out for me.
Код:
forward NearHouse(playerid, targetid, houseid); public NearHouse(playerid, targetid, houseid) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { for(new i = 0; i < sizeof(HouseInfo); i++) { if(IsPlayerInRangeOfPoint(playerid, 4.0, HouseInfo[houseid][ExitX], HouseInfo[houseid][ExitY], HouseInfo[houseid][ExitZ]) && GetWorld(targetid) == GetWorld(playerid)) { sendMessage(playerid, COLOR_DARKGREEN, "%s, %s, San Andreas", ReturnLocationEx(i)); SCM(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout), /ddo, /knock"); } } } return 1; }