CMD:casa(playerid, params[])
{
if(PlayerDados[playerid][Admin] < 1) return SendClientMessage(playerid, VERMELHO, "[ERRO] - Vocк nao Possui Admin");
SetTimerEx("CasaM",0,false,"i",playerid);
return 1;
}
forward CasaM(playerid);
public CasaM(playerid)
{
new Float:X, Float:Y, Float:Z, Float:A;
new barril;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PosicaoFrentePlayer(playerid, X, Y, 10);
barril = casamadeira = CreateObject(18259, X, Y, Z-30, 0.0, -0.0, A-0, 300.0);
Barris[tBarris] = barril;
tBarris ++;
PosicaoFrentePlayer(playerid, X, Y, 30);
MoveObject(casamadeira,X,Y-1,Z, 5.00);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
format(String, sizeof(String), "{8B4513}%s: Criaзгo da Casa de Madeira!", Nome(playerid));
ProxDetector(10.0, playerid, String, BRANCO,BRANCO,BRANCO,BRANCO,BRANCO);
if(IsPlayerInRangeOfPoint(casamadeira, 1.5, x,y,z))
{
SetTimerEx("CasaMorte",10000,true,"i",playerid);
}
return true;
}
OnPlayerUpdate й chamada a cada movimento que o jogador faz, eu acho, crie uma callback e crie um timer quando a casa de madeira for criada... foi isso que eu entendi do que voce postou...
|
[12:02:00] OnPlayerUpdate Chamada
[12:02:00] OnPlayerUpdate Chamada
[12:02:01] OnPlayerUpdate Chamada
[12:02:01] OnPlayerUpdate Chamada
[12:02:02] OnPlayerUpdate Chamada
[12:02:02] OnPlayerUpdate Chamada
[12:02:03] OnPlayerUpdate Chamada
[12:02:03] OnPlayerUpdate Chamada
[12:02:04] OnPlayerUpdate Chamada
[12:02:04] OnPlayerUpdate Chamada
[12:02:05] OnPlayerUpdate Chamada
[12:02:05] OnPlayerUpdate Chamada
[12:02:06] OnPlayerUpdate Chamada
[12:02:06] OnPlayerUpdate Chamada
[12:02:07] OnPlayerUpdate Chamada
[12:02:07] OnPlayerUpdate Chamada
[12:02:08] OnPlayerUpdate Chamada
[12:02:08] OnPlayerUpdate Chamada
[12:02:09] OnPlayerUpdate Chamada
[12:02:09] OnPlayerUpdate Chamada
[12:02:10] OnPlayerUpdate Chamada
[12:02:10] OnPlayerUpdate Chamada
[12:02:11] OnPlayerUpdate Chamada
[12:02:11] OnPlayerUpdate Chamada
[12:02:12] OnPlayerUpdate Chamada
[12:02:12] OnPlayerUpdate Chamada
[12:02:13] OnPlayerUpdate Chamada
[12:02:13] OnPlayerUpdate Chamada
[12:02:14] OnPlayerUpdate Chamada
[12:02:15] OnPlayerUpdate Chamada
[12:02:15] OnPlayerUpdate Chamada
[12:02:16] OnPlayerUpdate Chamada
[12:02:16] OnPlayerUpdate Chamada
[12:02:17] OnPlayerUpdate Chamada
[12:02:17] OnPlayerUpdate Chamada
[12:02:18] OnPlayerUpdate Chamada
[12:02:18] OnPlayerUpdate Chamada
[12:02:19] OnPlayerUpdate Chamada
[12:02:19] OnPlayerUpdate Chamada
[12:02:20] OnPlayerUpdate Chamada
[12:02:20] OnPlayerUpdate Chamada
[12:02:21] OnPlayerUpdate Chamada
[12:02:21] OnPlayerUpdate Chamada
[12:02:22] OnPlayerUpdate Chamada
[12:02:22] OnPlayerUpdate Chamada
[12:02:23] OnPlayerUpdate Chamada
[12:02:23] OnPlayerUpdate Chamada
[12:02:24] OnPlayerUpdate Chamada