else if(TutTime[i] == 25) { ClearChatbox(i, 10); //SetPlayerCameraPos( i, 1143.8341, -1039.4705, 81.0823 ); //SetPlayerCameraLookAt( i, 1150.5505, -1046.6729, 79.3458 ); //SetCameraBehindPlayer(i); //JBC_TogglePlayerControllable(i, 0); //SetPlayerVirtualWorld(i, 0); //SetPlayerInterior(i, 14); //PlayerInfo[i][pInt] = 14; //JBC_SetPlayerPos(i, -1855.568725, 41.263156, 1061.143554); SendClientMessage(i, 0x0080FFFF, "{FFFFFF}Stanite na crveni marker da izadjete iz aviona!"); ClearChatbox(i, 2); SetPlayerCheckpoint(i, 2.384830, 33.103397, 1199.849976, 2) if (IsPlayerInCheckpoint(i)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; }
if (IsPlayerInCheckpoint(i)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; } }
hy guys, im creating tut and i have this prob:
Код:
else if(TutTime[i] == 25) { ClearChatbox(i, 10); //SetPlayerCameraPos( i, 1143.8341, -1039.4705, 81.0823 ); //SetPlayerCameraLookAt( i, 1150.5505, -1046.6729, 79.3458 ); //SetCameraBehindPlayer(i); //JBC_TogglePlayerControllable(i, 0); //SetPlayerVirtualWorld(i, 0); //SetPlayerInterior(i, 14); //PlayerInfo[i][pInt] = 14; //JBC_SetPlayerPos(i, -1855.568725, 41.263156, 1061.143554); SendClientMessage(i, 0x0080FFFF, "{FFFFFF}Stanite na crveni marker da izadjete iz aviona!"); ClearChatbox(i, 2); SetPlayerCheckpoint(i, 2.384830, 33.103397, 1199.849976, 2) if (IsPlayerInCheckpoint(i)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; } Код:
if (IsPlayerInCheckpoint(i)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; } } |
IsPlayerInRangeOfPoint(playerid, XPOS,YPOS,ZPOS, 7);
if (IsPlayerInRangeOfPoint(playerid, 1222,1111,1333, 7)) //change the coords just random.
{
SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!");
TutTime[i] += 974;
}
}[/
For checkpoints i attended to use IsPlayerInRangeOfPoint. It checks if the player is in the range of that point when he enter's the checkpoint.
So For example pawn Код:
|
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2.384830, 33.103397, 1199.849976)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; }
hmmm you think like this:
Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2.384830, 33.103397, 1199.849976)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 974; } |
hmmm you think like this:
Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2.384830, 33.103397, 1199.849976)) |
like this
if (IsPlayerInRangeOfPoint(playerid, 2.384830, 33.103397, 1199.849976 , 7)) |
else if(TutTime[i] == 999)
if(IsPlayerInRangeOfPoint(i, 7.0, 1.8651,23.1351,1199.5938)) { SendClientMessage(i, 0x0080FFFF, "{FFFFFF}TEST!!!"); TutTime[i] += 970; }