Staram się napisać plugin ktory by automatycznie teleportował graczy do prezentów(współdłużne x,y,z). Już jest prawie skonczony ale nie wiem czemu teleportuje tylko jednego gracza(pierwszego na serwerze reszty nie rusza)
#include <sourcemod>
#include <sdktools>
#define PL_VERSION "1.0"
new Float:g_fLocation[MAXPLAYERS + 1][3];
new Float:g_fLocation1[MAXPLAYERS + 1][3];
public Plugin:myinfo =
{
name = " Auto-Teleport Halloween 2013",
author = "Kazhan",
description = "Auto-Teleport on Halloween map 2013",
version = PL_VERSION,
url = ""
}
public OnClientPutInServer(serial)
{
CreateTimer(5.0, Tele1,GetClientFromSerial (serial), TIMER_REPEAT)
CreateTimer(10.0, Tele2,GetClientFromSerial (serial), TIMER_REPEAT)
g_fLocation[serial][0] = 6121.0; // daszek
g_fLocation[serial][1] = 7599.0;
g_fLocation[serial][2] = 360.0;
g_fLocation1[serial][0] = 7972.0; // przy domku
g_fLocation1[serial][1] = 7585.0;
g_fLocation1[serial][2] = -110.0;
}
public Action:Tele1(Handle:timer, any:serial)
{
new client = GetClientFromSerial(serial)
TeleportEntity(serial, g_fLocation[serial], NULL_VECTOR, NULL_VECTOR);
}
public Action:Tele2(Handle:timer, any:serial)
{
new client = GetClientFromSerial(serial)
TeleportEntity(serial, g_fLocation1[serial], NULL_VECTOR, NULL_VECTOR);
}
Użytkownik Kazhanek edytował ten post 08.11.2013 10:37