Originally posted by driss95
//Player Model Freeze Protection Attempt by coldmurda lol
if (IS_PLAYER_ONLINE() ==1){
int i;
float x,y,z,h;
float i,o,p;
float b,n,m;
float j,k,l;
Ped pPlayer, tmp;
uint tmp_model;
for(i = 0;i <= 16;i++){
if(!IS_NETWORK_PLAYER_ACTIVE(i)) continue;
if(COMPARE_STRING(GET_PLAYER_NAME(i),GET_PLAYER_NAME(GetPlayerIndex()))) continue;
GET_PLAYER_CHAR(i,&tmp);
if(DOES_CHAR_EXIST(tmp)){
GET_CHAR_MODEL(tmp, &tmp_model);
if (tmp_model == MODEL_PLAYER){ //checks if any player has a Niko Model (or Luis/Johny if DLC)
GET_CHAR_COORDINATES(tmp, &x, &y, &z);
GET_CHAR_COORDINATES(pPlayer, &i, &o, &p);
b = i + 100, n = o + 100, m = p + 100;
j = i - 100, k = o - 100, l = p - 100;
if (x <= b || x >= j && y <= n || y >= k && z <= m || z >= l){ //checks if Niko Model is within 100 distance
if (i > 0) SET_CHAR_COORDINATES(pPlayer, -1079.8, -469.7, 2.62); //if your on the Eastern Map, Teleport to West (prison cage)
else if (i<=0) SET_CHAR_COORDINATES(pPlayer, 2175.3516, 761.2235, 30.0); //if your on the Western Map, Teleport to East (Heli Pads)
}
}
}
}
}