Checkpoints -
moura98 - 27.09.2015
Eae Galera Meu primeiro post Aq, e estou com uma duvida:
vamos lб, tipo, minhas callbacks estao assim:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 285.9076,-32.2660,1001.5156, 1.0);
SetPlayerCheckpoint(playerid, 1335.4783,-1271.9274,13.5469, 2.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
ShowPlayerDialog(playerid, dialog_armas, DIALOG_STYLE_TABLIST, "Compra de Armas", "Eagle\tR$500\t100\nSpas\tR$1000\t100\nColete\tR$5 00\t1", "comprar", "Sair");
ShowPlayerDialog(playerid, dialog_veiculos, DIALOG_STYLE_TABLIST, "Compra de Veiculos", "Sultan\t R$ 25000", "Comprar", "Sair");
return 1;
}
o problema e q so aparece so 1 checkpoint como faзo pra aparecer os 2 no gamemode?
Obs: ja Criei as funзoes em OnDialogResponse corretamente.
Re: Checkpoints -
iBolivaRevolutioN - 27.09.2015
Tente colocar
Код:
SetPlayerCheckpoint(playerid, 285.9076,-32.2660,1001.5156, 1.0);
SetPlayerCheckpoint(playerid, 1335.4783,-1271.9274,13.5469, 2.0);
Que estao na public OnPlayerSpawn em OnPlayerConnect
Re: Checkpoints -
moura98 - 27.09.2015
'--'
Re: Checkpoints -
moura98 - 27.09.2015
Quote:
Originally Posted by iBolivaRevolutioN
Tente colocar
Код:
SetPlayerCheckpoint(playerid, 285.9076,-32.2660,1001.5156, 1.0);
SetPlayerCheckpoint(playerid, 1335.4783,-1271.9274,13.5469, 2.0);
Que estao na public OnPlayerSpawn em OnPlayerConnect
|
nao deu certo mano ficou a mesma coisa
Obs: a primeira checkpoint fica em interior
a segunda fica em rua normal
Re: Checkpoints -
MultiKill - 27.09.2015
Use o plugin
streamer
PHP код:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD);
Exemplo:
PHP код:
new CP[2];
CP[0] = CreateDynamicCP(285.9076,-32.2660,1001.5156, 1.0);
CP[1] = CreateDynamicCP(1335.4783,-1271.9274,13.5469, 2.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 1");
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 1");
}
return 1;
}
Re: Checkpoints -
moura98 - 27.09.2015
Quote:
Originally Posted by MultiKill
Use o plugin streamer
PHP код:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD);
Exemplo:
PHP код:
new CP[2];
CP[0] = CreateDynamicCP(285.9076,-32.2660,1001.5156, 1.0);
CP[1] = CreateDynamicCP(1335.4783,-1271.9274,13.5469, 2.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 1");
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 1");
}
return 1;
}
|
No caso terei que criar essas 2 callbacks novas?
Re: Checkpoints -
MultiKill - 27.09.2015
Depende do que vocк for fazer, se for sу mostrar um dialogo ao entrar em um cp, vocк sу precisaria usar a OnPlayerEnterDynamicCP.
Re: Checkpoints -
moura98 - 27.09.2015
Quote:
Originally Posted by MultiKill
Depende do que vocк for fazer, se for sу mostrar um dialogo ao entrar em um cp, vocк sу precisaria usar a OnPlayerEnterDynamicCP.
|
Nao deu certo parзa
Re: Checkpoints -
MultiKill - 27.09.2015
Mostre como vocк fez.
Re: Checkpoints -
moura98 - 27.09.2015
Quote:
Originally Posted by MultiKill
Mostre como vocк fez.
|
os erros sao:
C:\Users\Danrlei\Desktop\testes\gamemodes\teste.pw n(16) : error 010: invalid function or declaration
C:\Users\Danrlei\Desktop\testes\gamemodes\teste.pw n(135) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCP")
C:\Users\Danrlei\Desktop\testes\gamemodes\teste.pw n(147) : warning 235: public function lacks forward declaration (symbol "OnPlayerLeaveDynamicCP")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.