20.08.2015, 13:36
An example not sure what you exactly wanted
PHP код:
TeleportPlayerAroundObject(objectid, Float: radius) {
new
Float: X,
Float: Y,
Float: Z
;
if(GetObjectPos(objectid, X, Y, Z)) {
new
i,
count,
players[MAX_PLAYERS]
;
for(i = GetPlayerPoolSize(); i >= 0; --i) {
if(IsPlayerConnected(i)) {
players[count++] = i;
}
}
new
Float: step = 360.0 / count
;
for(i = 0; count; (Float: i) += step) {
SetPlayerPos(players[--count],
X + floatcos(Float: i, degrees) * radius,
Y + floatsin(Float: i, degrees) * radius,
Z
);
}
}
}