new EntradaPickup;
new SaidaPickup;
public OnGameModeInit()
{
EntradaPickup = CreatePickup(1239, 2, 1153.9978, -1772.0739, 16.5992, -1);
SaidaPickup = CreatePickup(1239, 2, 1153.9978,-1772.0739,16.5992, -1);
Create3DTextLabel("AGENCIA DE EMPREGOS",BRANCO,1153.9978,-1772.0739,16.5992,15,0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == SaidaPickup)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1153.9978, -1772.0739, 16.5992);
}
if(pickupid == EntradaPickup)
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 1494.325195, 1304.942871, 1093.289062);
}
Comandos Criados
CMD:entrar(playerid, params [])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1153.9978,-1772.0739,16.5992))
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 1494.325195, 1304.942871, 1093.289062);
}
return true;
}
CMD:sair(playerid, params [])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.3717, 1304.0521, 1093.2891))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1153.9978, -1772.0739, 16.5992);
}
return true;
}
Code:
new bool:onCheck[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1491.4188, 1305.9792, 1093.2964, 2.0);
onCheck[playerid] = true;
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid]) // if it's true
{
GivePlayerMoney(playerid, 1000);
onCheck[playerid] = false;
}
return 1;
}
CreatePickup(1239, 1, 1153.9978, -1772.0739, 16.5992, -1);
CreatePickup(modelid, type <--- Coloque 1 no Type!
PHP код:
|
mano coloque em [ PHP]...seu codigo... [ /PHP], outro checkpoint com o mesmo problema? faзa o mesmo!
|