11.06.2011, 15:11
well it didnt work anyway here the full codes.
it keep spamming that "player Leaved the Golf area without finishing his job" when player connect any help ?
pawn Код:
public golfclub()
{
foreach(Player, i)
{
if(PlayerToPoint(1, i, 1497.7394,2773.8582,10.8203))
{
if(GolfArea[i] == 0)
{
if(gTeam[i] == Mafia_Team)
{
TextDrawShowForPlayer(i, Golftake[i]);
GolfArea[i] = 1;
}
else
{
new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "%s reach Golf Area", name);
SendClientMessageToAll(COLOR_ORANGE,str);
GolfArea[i] = 1;
SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 25 seconds to finish your job");
Tmgolf[i] = SetTimer("GolfMission",10000,0);
}
}
}
else
{
new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "%s Leaved the Golf area without finishing his job", name);
SendClientMessageToAll(COLOR_ORANGE,str);
GolfArea[i] = 0; // When he leaves, he's no longer in the area
KillTimer(Tmgolf[i]);
return 1;
}
}
return 1;
}