Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Handle:hSpawns;
- public OnPluginStart() {
- hSpawns = CreateArray();
- }
- public OnMapStart() {
- new iEntity = -1;
- ClearArray(hSpawns);
- while ( (iEntity = FindEntityByClassname(iEntity, "info_player_start") != -1 ) {
- PushArrayCell(hSpawns, iEntity);
- }
- }
- /* to teleport the player */
- new Float:fOrigin[3];
- new spawn = GetRandomInt(0, GetArraySize(hSpawns)-1);
- GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fOrigin);
- TeleportEntity(client, fOrigin, NULL_VECTOR, NULL_VECTOR);
Add Comment
Please, Sign In to add comment