Raised This Month: $51 Target: $400
 12% 

Teleport Terrorists to SpawnPoint


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 04-01-2023 , 14:31   Teleport Terrorists to SpawnPoint
Reply With Quote #1

Hello, can someone give me an example of how I can teleport terrorists back to the map spawnpoint?

If possible explaining what each function does, I need a foundation for a plugin I'm doing
MeliMeli is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 04-02-2023 , 14:55   Re: Teleport Terrorists to SpawnPoint
Reply With Quote #2

Code:
ExecuteHam(Ham_CS_RoundRespawn, id)
jimaway is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-04-2023 , 20:27   Re: Teleport Terrorists to SpawnPoint
Reply With Quote #3

PHP Code:
TeleportPlayerToSpawn(id)
{
    new 
iSpawn 0pid;
    switch( 
get_user_team(id) )
    {
        case 
1: while( < (iSpawn find_ent_by_class(iSpawn"info_player_deathmatch")) <= id ) { pid iSpawn; };
        case 
2: while( < (iSpawn find_ent_by_class(iSpawn"info_player_start")) <= id ) { pid iSpawn; };
    }

    if(
pid 0)
    {
        new 
Float:fOrigin[3];
        
pev(pidpev_originfOrigin);
        
engfunc(EngFunc_SetOriginidfOrigin);
        return 
1;
    }

    return 
0;

There you go..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-05-2023 at 22:09.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 04-13-2023 , 08:12   Re: Teleport Terrorists to SpawnPoint
Reply With Quote #4

Thanks dog dog
MeliMeli is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode