06.11.2010, 14:54
Bom na vida real tem akeles policias que vem com um escudo na frente e os otros vao atras // << nao estranhe isso vil xD
Ai tipow eu tava aki e fiz um bagui mais tipow o objeto nao esta aparecendo ele fica com anim mais o escudo nao fica na frente dele ... nen aparece.
[/CODE]
Ai tipow eu tava aki e fiz um bagui mais tipow o objeto nao esta aparecendo ele fica com anim mais o escudo nao fica na frente dele ... nen aparece.
Код:
#include <a_samp> #define ROJO 0xFF0000FF #define VERDE 0x00A200FF #define AZUL 0x0000DAFF #define NARANJA 0xFFB400FF #define BLANCO 0xFFFFFFAA new OEscudo[MAX_PLAYERS]; new ConEscudo[MAX_PLAYERS]; public OnPlayerDeath(playerid) { ConEscudo[playerid] = 0; DestroyObject(OEscudo[playerid]); return 1; } public OnPlayerSpawn(playerid) { ConEscudo[playerid] = 0; return 1; } public OnPlayerDisconnect(playerid, reason) { DestroyObject(OEscudo[playerid]); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/escudo", cmdtext, true, 10) == 0) { if(ConEscudo[playerid] == 0) { DestroyObject(OEscudo[playerid]); ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); OEscudo[playerid] = CreateObject(1499,2340.65112305,-1655.59033203,12.37441444,0.00000000,0.00000000,0.00000000,-90.000); AttachObjectToPlayer(OEscudo[playerid],playerid,-0.8,0.5,-1.65,0.0,0,0.0); ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); SetTimerEx("TAnim", 500, 0, "i", playerid); ConEscudo[playerid] = 1; return 1; } else if(ConEscudo[playerid] == 1) { DestroyObject(OEscudo[playerid]); SendClientMessage(playerid,ROJO,"Voce largou o escudo!"); ClearAnimations(playerid); ConEscudo[playerid] = 0; return 1; } } return 0; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_JUMP) { if(ConEscudo[playerid] == 1) { new Float: X, Float: Y, Float: Z; GetPlayerPos(playerid,X,Y,Z); SetPlayerPos(playerid,X,Y,Z); ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); SetTimerEx("TAnim", 500, 0, "i", playerid); } } if(newkeys == KEY_FIRE) { if(ConEscudo[playerid] == 1) { ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); SetTimerEx("TAnim", 500, 0, "i", playerid); } } if(newkeys == KEY_CROUCH) { if(ConEscudo[playerid] == 1) { new Float: X, Float: Y, Float: Z; GetPlayerPos(playerid,X,Y,Z); SetPlayerPos(playerid,X,Y,Z); ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); SetTimerEx("TAnim", 500, 0, "i", playerid); } } if(newkeys == KEY_SECONDARY_ATTACK) { if(ConEscudo[playerid] == 1) { ConEscudo[playerid] = 0; DestroyObject(OEscudo[playerid]); SendClientMessage(playerid,ROJO,"Escudo Retirado!."); ClearAnimations(playerid); } } return 1; } forward TAnim(playerid); public TAnim(playerid) { ApplyAnimation(playerid,"SWORD","anim_escudo",50.0,0,1,1,1,1); return 1; }