SetPlayerAttachedObject(playerid,1,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
SetPlayerAttachedObject(playerid,2,18642,7,0.1,0.0,-0.11,0.0,-90.0,90.0);
GivePlayerWeapon(playerid,3,1);
SetPlayerArmour(playerid,100.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE," Vocк pegou seu Escudo!");
RemovePlayerAttachedObject(playerid,1);
RemovePlayerAttachedObject(playerid,2);
SendClientMessage(playerid, COLOR_LIGHTBLUE," Vocк guardou seu Escudo!");
Vo testar Paulo
Vlw macin, fiquei sabendo de uma corda pra 0.3d ja.. vo fase do Paulo e tenta dpois os fios vlw ![]() sу n entendo pq nao aparece os objetos ke coloco? VLW PAULO FUNFO!! SУ FALTA A CORDA, KE SERIA ATACHADA?? VO VE ISO ![]() |
//-------------------------------------------------// //-------------------------------------------------// //-------------------------------------------------// /* *-------------------------------------* | | | Escudo Personal | | Por GROVE4L | | www.pawnoscripting.com | | | *-------------------------------------* */ //-------------------------------------------------// //-------------------------------------------------// //-------------------------------------------------// #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","sword_block",50.0 ,0,1,1,1,1); OEscudo[playerid] = CreateObject(1533,2470.573,-1660.366,14.271,0.0,0.0,-90.000); AttachObjectToPlayer(OEscudo[playerid],playerid,-0.8,0.5,-1.65,0.0,0,0.0); ApplyAnimation(playerid,"SWORD","sword_block",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,"Vocк deixou 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","sword_block",50.0 ,0,1,1,1,1); SetTimerEx("TAnim", 500, 0, "i", playerid); } } if(newkeys == KEY_FIRE) { if(ConEscudo[playerid] == 1) { ApplyAnimation(playerid,"SWORD","sword_block",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","sword_block",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,"Vocк deixou o escudo."); ClearAnimations(playerid); } } return 1; } forward TAnim(playerid); public TAnim(playerid) { ApplyAnimation(playerid,"SWORD","sword_block",50.0 ,0,1,1,1,1); return 1; } // Escudo Personal por GROVE4L // www.pawnoscripting.com |