if(informacje_przedmiotu_gracza[id][0] == 38) set_task(1.0, "Tspawn", id)Na końcu
Spoiler
public Tspawn(id) {
new client = id
new CsTeams:iTeam;
iTeam = cs_get_user_team(client);
new iSpawnOrigin[3];
new Float:fSpawnAngle[3];
new ent;
ent = -1;
switch(iTeam) {
case CS_TEAM_T:
{
while((ent = find_ent_by_class( ent, "info_player_deathmatch")) != 0) {
if(!pev_valid(ent))
break;
}
get_user_origin(ent, iSpawnOrigin);
}
case CS_TEAM_CT:
{
while((ent = find_ent_by_class(ent, "info_player_start")) != 0) {
if(!pev_valid(ent))
break;
}
get_user_origin(ent, iSpawnOrigin);
}
case CS_TEAM_SPECTATOR:
{
return;
}
}
if(!is_user_alive(client))
return;
new Float:fSpawnOrigin[3];
fSpawnOrigin[0] = iSpawnOrigin[0] + 0.0;
fSpawnOrigin[1] = iSpawnOrigin[1] + 0.0;
fSpawnOrigin[2] = iSpawnOrigin[2] + 0.0;
entity_set_vector( client, EV_VEC_origin, fSpawnOrigin );
entity_set_int( client, EV_INT_fixangle, 1 );
entity_set_vector( client, EV_VEC_angles, fSpawnAngle );
TeleportMSG(client);
}
TeleportMSG(client) {
new fNewSpawnOrigin[3];
get_user_origin(client, fNewSpawnOrigin, 2);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, { 0, 0, 0 }, client)
write_byte(TE_TELEPORT)
write_coord(fNewSpawnOrigin[0])
write_coord(fNewSpawnOrigin[1])
write_coord(fNewSpawnOrigin[2])
message_end( )
}I to w ogóle mnie nie teleportuje


Dodatki SourceMod



Temat jest zamknięty









