OnPlayerEnterCheckpoint y
GivePlayerWeapon
Serнa asн (usando el streamer de Incognito)
pawn Код:
new Checkpoint[MAX_PLAYERS];
public OnGameModeInit()
{
Checkpoint[playerid] = CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if (checkpointid == Checkpoint[playerid])
{
GivePlayerWeapon(playerid, ARMA, BALAS);
}
return 1;
}
Para el map hay varias opciones.
- Los CreateObject / CreateDynamicObject en OnGameModeInit() directamente o creando un stock y los RemoveBuildingForPlayer en OnPlayerConnect(playerid)
Asн:
pawn Код:
public OnGameModeInit()
{
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
return 1;
}
public OnPlayerConnect(playerid)
{
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
return 1;
}
O asн:
pawn Код:
public OnGameModeInit()
{
CargarObjetos();
return 1;
}
public OnPlayerConnect(playerid)
{
CargarObjetosDestruidos(playerid);
return 1;
}
stock CargarObjetos()
{
CreateObject (modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
CreateObject (modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
CreateObject (modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
}
stock CargarObjetosDestruidos(playerid)
{
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
}
Saludos.