[Ajuda] Objetos no corpo desaparecem
#3

Codigo completo :

Quote:

if(strcmp(cmd, "/usar", true) == 0) // by Cuervo
{
if(IsPlayerConnected(playerid))
{
new x_nr[24];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, 0x0080FFAA, "Ultilize '/usar [Item desejado]'");
SendClientMessage(playerid, -1, "[Objetos] Mochila, Maleta, Bolsagrana, Gasolina, Capacete, Bone, Bola, Bola2");
SendClientMessage(playerid, -1, "[Objetos] caixapizza, fatiapizza, sacoburguer, copoburguer, copoverde, coposprunk");
SendClientMessage(playerid, -1, "[Objetos] garrafacerveja, garrafacerveja2, latasprunk, galaogasolina, radiodemao");
SendClientMessage(playerid, -1, "[Objetos] pranchasurfcosta, bandeiraverde, discovinil, notagrana, bolasinuca, cigarro2");
SendClientMessage(playerid, -1, "[Objetos] cadeadocorrente, secadorcabelo, controleremoto, revistas, parachute");
SendClientMessage(playerid, -1, "[Retirar] nenhum");
return 0x01;
}
//371
if(strcmp(x_nr,"Mochila1",true) == 0)
{
AttachObjectCorrectly(playerid, 371);
}
//Obrigado especialmente a Linow por pegar as coordenadas dos objetos abaixo.
else if(strcmp(x_nr,"parachute", true) == 0) SetPlayerAttachedObject( playerid, 0, 371, 1, 0.057849, -0.123179, -0.027480, 9.241791, 87.611961, 0.000000, 1.000000, 1.000000, 1.000000 ); // gun_para - Parachute bag
else if(strcmp(x_nr, "caixapizza", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2814, 6, 0.321266, 0.057534, 0.057859, 97.888328, 0.880973, 190.630813, 1.000000, 1.000000, 1.000000 ); // GB_takeaway01 - Caixa de Pizza
else if(strcmp(x_nr, "fatiapizza", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2702, 5, 0.177787, 0.098733, -0.008552, 142.440948, 201.057891, 94.765419, 1.000000, 1.000000, 1.000000 ); // CJ_PIZZA_1 - Fatia de pizza
else if(strcmp(x_nr, "sacoburguer", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2663, 6, 0.265127, 0.015637, 0.053388, 355.166931, 262.028015, 1.171746, 1.000000, 1.000000, 1.000000 ); // CJ_BS_BAG - Saco de Hamburguers
else if(strcmp(x_nr, "copoburguer", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2647, 6, 0.210432, 0.008932, 0.040378, 0.000000, 261.249572, 189.423721, 1.000000, 1.000000, 1.000000 ); // CJ_BS_CUP - Copo Burguer Shot
else if(strcmp(x_nr, "copoverde", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1455, 6, 0.141407, 0.023757, 0.014947, 0.000000, 258.703643, 358.777435, 1.000000, 1.000000, 1.000000 ); // DYN_GLASS - Copo Verde de Bar
else if(strcmp(x_nr, "coposprunk", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1546, 6, 0.129205, 0.029906, 0.000000, 0.000000, 262.837097, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_PINT_GLASS - Copo de Sprunk
else if(strcmp(x_nr, "garrafacerveja", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1484, 6, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_BEAR_BOTTLE - Garrafa branca de cerveja R*
else if(strcmp(x_nr, "garrafacerveja2", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1543, 6, 0.045896, 0.027469, -0.270195, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_BEER_B_2 - Cerveja Pissh
else if(strcmp(x_nr, "latasprunk", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2601, 6, 0.056758, 0.054710, 0.022383, 358.989624, 319.544830, 174.580841, 1.000000, 1.000000, 1.000000 ); // CJ_JUICE_CAN - Lata de Sprunk
else if(strcmp(x_nr, "galaogasolina", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1650, 6, 0.127828, 0.014152, 0.043462, 12.808332, 262.535308, 359.529205, 1.000000, 1.000000, 1.000000 ); // petrolcanm - GalГЈo de Gasolina
else if(strcmp(x_nr, "radiodemao", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2226, 6, 0.398310, 0.000000, 0.071235, 0.000000, 259.946838, 0.000000, 1.000000, 1.000000, 1.000000 ); // LOW_HI_FI_3 - Radio de mГЈo
else if(strcmp(x_nr, "pranchasurfcosta", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2404, 1, 0.051352, -0.140526, -0.077093, 0.000000, 121.550628, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_SURF_BOARD - Prancha de surf nas costas
else if(strcmp(x_nr, "bandeiraverde", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2914, 6, 0.060003, 0.007976, -0.196203, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // kmb_rcflag - Bandeira Verde
else if(strcmp(x_nr, "discovinil", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1961, 6, 0.058296, 0.043930, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // record3 - Disco de vinil verde
else if(strcmp(x_nr, "notagrana", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1212, 6, 0.118311, 0.029233, 0.029525, 0.000000, 260.214324, 0.000000, 1.000000, 1.000000, 1.000000 ); // Money - Dinheiro na mГЈo
else if(strcmp(x_nr, "bolasinuca", true) == 0) return SetPlayerAttachedObject( playerid, 0, 3106, 6, 0.080988, 0.032399, 0.000000, 0.000000, 9.756810, 276.639984, 1.000000, 1.000000, 1.000000 ); // k_poolball8 - bola de sinuca
else if(strcmp(x_nr, "cigarro2", true) == 0) return SetPlayerAttachedObject( playerid, 0, 1485, 6, 0.102923, 0.018322, -0.055598, 0.000000, 265.589630, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_CIGGY - Cigarro "de verdade"
else if(strcmp(x_nr, "cadeadocorrente", true) == 0) return OnPlayerCommandText(playerid, "/me"), SetPlayerAttachedObject( playerid, 0, 2680, 6, 0.167333, -0.002808, -0.062444, 43.306316, 353.954162, 11.737417, 1.000000, 1.000000, 1.000000 ); // CJ_Padlock - Cadeado com corrente
else if(strcmp(x_nr, "secadorcabelo", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2750, 6, 0.069758, 0.034868, -0.086324, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_hair_dryer - Secador de cabelo
else if(strcmp(x_nr, "controleremoto", true) == 0) return OnPlayerCommandText(playerid, "/me retira o controle remoto do bolso."), SetPlayerAttachedObject( playerid, 0, 2344, 6, 0.083500, 0.037107, 0.062949, 265.096954, 272.822845, 346.655883, 1.000000, 1.000000, 1.000000 ); // CJ_REMOTE - Controle remoto
else if(strcmp(x_nr, "revistas", true) == 0) return SetPlayerAttachedObject( playerid, 0, 2855, 6, 0.237280, 0.090076, 0.042588, 110.352005, 4.360593, 0.000000, 1.000000, 1.000000, 1.000000 ); // gb_bedmags05 - 5 Revistas empilhadas
//Finish coords by linow, vlw by J#u#s#t#i#n#@##
else if(strcmp(x_nr,"Mochila",true) == 0)
{
AttachObjectCorrectly(playerid, 3026);
}
else if(strcmp(x_nr,"Bola2",true) == 0)
{
bolaa[playerid] = 1;
SetPlayerHoldingObject(playerid, 2114,6,0.7,0.0,0.0,270.0,270.0,0.0);
}
else if(strcmp(x_nr,"Bola",true) == 0)
{
bolaa[playerid] = 1;
AttachObjectCorrectly(playerid, 2114);
}
else if(strcmp(x_nr,"Maleta",true) == 0)
{
AttachObjectCorrectly(playerid, 1210);
}
else if(strcmp(x_nr,"Bolsagrana",true) == 0)
{
AttachObjectCorrectly(playerid, 1550);
}
else if(strcmp(x_nr,"Gasolina",true) == 0)
{
AttachObjectCorrectly(playerid, 1650);
}
else if(strcmp(x_nr,"Capacete1",true) == 0)
{
AttachObjectCorrectly(playerid, 18936);
}
else if(strcmp(x_nr,"chapeu1",true) == 0)
{
AttachObjectCorrectly(playerid, 18926);
}
else if(strcmp(x_nr,"bshot",true) == 0)
{
AttachObjectCorrectly(playerid, 19094);
}
else if(strcmp(x_nr,"cowboy",true) == 0)
{
AttachObjectCorrectly(playerid, 19095);
}
else if(strcmp(x_nr,"papainoel",true) == 0)
{
AttachObjectCorrectly(playerid, 19064);
}
else if(strcmp(x_nr,"Capacete",true) == 0)
{
SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0, 0, 88, 75, 0);
//AttachObjectCorrectly(playerid, 2053);
}
else if(strcmp(x_nr,"Bone",true) == 0)
{
AttachObjectCorrectly(playerid, 2054);
}
else if(strcmp(x_nr,"Nenhum",true) == 0)
{
bolaa[playerid] = 0;
StopPlayerHoldingObject(playerid);
/*if(IsPlayerAttachedObjectSlotUsed(playerid,0)) RemovePlayerAttachedObject(playerid,0);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
if(IsPlayerAttachedObjectSlotUsed(playerid,4)) RemovePlayerAttachedObject(playerid,4);
if(IsPlayerAttachedObjectSlotUsed(playerid,5)) RemovePlayerAttachedObject(playerid,5);
if(IsPlayerAttachedObjectSlotUsed(playerid,6)) RemovePlayerAttachedObject(playerid,5);
*/
new zz=0;
while(zz!=MAX_PLAYER_ATTACHED_OBJECTS) {
if(IsPlayerAttachedObjectSlotUsed(playerid, zz)) {
RemovePlayerAttachedObject(playerid, zz);
}
zz++;
}
if(IsACop(playerid) && PlayerInfo[playerid][pDuty] == 1)
{
if(Tazer[playerid] == 1)
{
AttachWeaponCorrectly(playerid, 24);
}
else
{
AttachWeaponCorrectly(playerid, 23);
}
}
}
else return SendClientMessage(playerid, COLOR_GRAD2,"
Item desconhecido.");
}
return 0x01;
}

Reply


Messages In This Thread
Objetos no corpo desaparecem - by ImperfectEyes - 23.09.2013, 02:19
Re: Objetos no corpo desaparecem - by Sti - 23.09.2013, 02:23
Re: Objetos no corpo desaparecem - by ImperfectEyes - 23.09.2013, 03:24

Forum Jump:


Users browsing this thread: 1 Guest(s)