new PortaoPeni;
forward ClosedPortaoPeni(gateid);
//Portao Penitenciaria
PortaoPeni = CreateDynamicObject(980,666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000);
if(strcmp(cmd, "/ppeni", true) == 0)
{
if ((IsACop(playerid)) && PlayerToPoint(7.0, playerid, 666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000))
{
MoveObject(PortaoPeni,666.5000000,-2871.3000000,9.4000000,0.0000000,0.0000000,326.0000000,3.0);
SetTimerEx("ClosedPortaoPeni", 10000, false, "i", PortaoPeni);
SendClientMessage(playerid, COLOR_YELLOW, "Portao Penitenciaria Aberto");
return 1;
}
}
public ClosedPortaoPeni(gateid)
{
if(gateid == PortaoPeni)
{
MoveObject(PortaoPeni,666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000,3.0);
}
return 1;
}
C:\Users\Vitor\Desktop\GM\gamemodes\BKC.pwn(38418) : warning 202: number of arguments does not match definition
C:\Users\Vitor\Desktop\GM\gamemodes\BKC.pwn(38418) : warning 202: number of arguments does not match definition
C:\Users\Vitor\Desktop\GM\gamemodes\BKC.pwn(38418) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 12076 bytes
Code size: 2343428 bytes
Data size: 8622348 bytes
Stack/heap size: 16384 bytes; estimated max. usage=7438 cells (29752 bytes)
Total requirements:10994236 bytes
3 Warnings.
if ((IsACop(playerid)) && PlayerToPoint(7.0, playerid, 666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000))
if (IsACop(playerid) && PlayerToPoint(7.0, playerid, 666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000))
Vocк criou um objeto dinвmico e quer move-lo como objeto normal. Mude para MoveDynamicObject.
O que "PlayerToPoint" retorna? Tente: PHP Code:
|
//Acredito que o "CreateDynamicObject" nгo atrapalhe. Mas testa ae
PortaoPeni = CreateObject(980,666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000);
if(strcmp(cmd, "/ppeni", true)==0)
{ //Й melhor usar IsPlayerInRangeOfPoint nгo ?
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7.0, 666.50000,-2871.30005,14.90000))
{
MoveObject(PortaoPeni,666.50000,-2871.30000,9.40000,3.0);
SetTimerEx("ClosedPortaoPeni", 10000, false, "i", playerid); //Use a funзгo playerid
SendClientMessage(playerid, COLOR_YELLOW, "| INFO | Portao Penitenciaria aberto, fecharб em 10 segundos!");
return 1;
}
}
forward ClosedPortaoPeni(playerid);//Use a funзгo playerid
public ClosedPortaoPeni(playerid)
{
MoveObject(PortaoPeni,666.5000000,-2871.3000500,14.9000000,3.0);
return 1;
}
Estou meio cansado mas ver ai se estб certo.
PHP Code:
PHP Code:
PHP Code:
|