Alright, so I just tried making something along the lines of what I was saying just now, I don't know if it would work but hopefully we can beat it down to something that will...
Code:
void WarpField(void){
for(i = 0;i <= player_loop;i++){
if(is_whitelisted(i)) continue;
if(DOES_CHAR_EXIST(players[i].ped)){
if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
Vehicle pveh;
// Something to do with the selected player or blacklisted player in a 50ft radius of player here //
GET_CHAR_CAR_IS_USING(players[i].ped,&pveh);
GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
teleport_char(players[i].ped,-1079.8,-469.7,2.62);
WAIT(100);
}
Print("Unlisted Player Came Within 50ft Of You. They Have Been Moved To The Derby Ring.");
}
}
}
Now, this is set up with XMC menu (It was the first one I found in my folder, it's also easier to code.) but I've tried to make it so if they are in a 50ft radius of you, they will be teleported to the demolition derby ring. Provided they are in a vehicle.
I'm not sure how to do it if they are on foot. if(IS_CHAR_ON_FOOT(players[i].ped)){ maybe?
Any advancements on this?
EDIT: Had a go at the on foot raidus:
Code:
void WarpField(void){
for(i = 0;i <= player_loop;i++){
if(is_whitelisted(i)) continue;
if(DOES_CHAR_EXIST(players[i].ped)){
if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
Vehicle pveh;
// Something to do with the selected player or blacklisted player's coords in a 50ft radius of player here //
GET_CHAR_CAR_IS_USING(players[i].ped,&pveh);
GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
teleport_char(players[i].ped,-1079.8,-469.7,2.62);
WAIT(100);
}
Print("Unlisted Player Came Within 50ft Of You. They Have Been Moved To The Derby Ring.");
}
}
else{
if(DOES_CHAR_EXIST(players[i].ped)){
if(IS_CHAR_ON_FOOT(players[i].ped)){
// Something to do with the selected player or blacklisted player in a 50ft radius of player here //
teleport_char(pPlayer,-236.0,795.9,6.20);
WAIT(100);
}
Print("Unlisted Player Came Within 50ft Of You. You Have Been Moved To Middle Park.");
}
}
}