daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Jun 18th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new Handle:hSpawns;
  2.  
  3. public OnPluginStart() {
  4.     hSpawns = CreateArray();
  5. }
  6.  
  7. public OnMapStart() {
  8.     new iEntity = -1;
  9.    
  10.     ClearArray(hSpawns);
  11.    
  12.     while ( (iEntity = FindEntityByClassname(iEntity, "info_player_start") != -1 ) {
  13.         PushArrayCell(hSpawns, iEntity);
  14.     }    
  15. }
  16.  
  17. /* to teleport the player */
  18.  
  19. new Float:fOrigin[3];
  20. new spawn = GetRandomInt(0, GetArraySize(hSpawns)-1);
  21. new iEntity = GetArrayCell(hSpawns, spawn);
  22. GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fOrigin);
  23. TeleportEntity(client, fOrigin, NULL_VECTOR, NULL_VECTOR);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top