30.07.2011, 17:55
1. Why this function doesnt work? It returns nothing.
2. Why this doesnt work? I want to make that I can use function only in some position or when player is on boat, but I can use it anywhere:
THANKS
pawn Код:
stock GetPlayerIDFromName(vardas[])
{
foreach(Player, i)
{
if(strcmp(GetPlayerNameEx(i), vardas, false, strlen(vardas))) return i;
}
return INVALID_PLAYER_ID;
}
pawn Код:
if(IsPlayerOnBoat(playerid) || IsPlayerInRangeOfPoint(playerid, 5.0, -2230.2192, 2438.6248, 2.4934) || IsPlayerInRangeOfPoint(playerid, 5.0, -2214.2671, 2423.2520, 2.4970) || IsPlayerInRangeOfPoint(playerid, 5.0, -2249.8706, 2418.3701, 2.4971) || IsPlayerInRangeOfPoint(playerid, 5.0, -2234.0686, 2402.3960, 2.4899))
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, -1, "{FFFFFF}[ {FF0000}KLAIDA {FFFFFF}]: Jыs turite bыti ant {33AA33}kojш!");
<..>