13.02.2015, 12:40
Код:
stock IsAtDynamicPoint(playerid, type) { if(IsPlayerConnected(playerid)) { for(new x; x < MAX_DYNAMICPOINTS; x++) { if(DynamicPoints[x][dynamicPosX] != 0) { if(DynamicPoints[x][dynamicType] == type) { switch(DynamicPoints[x][dynamicType]) { case 0: { if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1; } case 1: { if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1; } case 2: { if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1; } case 3: { if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1; } case 4: { if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1; } } } } } } return 0; }