Funciуn toys por catalogo
#1

Al intentar realizar esta funciуn me tiran errores de otras lineas, yo lo que quiero es que te de el toy en X ranura

Quote:

if(listid == ToysM)
{
if(response)
{
GivePlayerCash(playerid, -HoldingObjectsCop[listitem][holdingprice]);
PlayerToyInfo[playerid][slotselection[playerid]][ptModelID] = HoldingObjectsCop[listitem][holdingmodelid];
Tax += HoldingObjectsCop[listitem][holdingprice];
new businessID = GetPlayerVirtualWorld(playerid)-BUSINESS_VIRTUAL_WORLD;
if(GetPlayerCash(playerid) < HoldingObjects[listitem][holdingprice]) return SendClientMessageEx(playerid, COLOR_WHITE, "Info: No tienes suficiente dinero.");
else
{
businessVariables[businessID][bVault] += HoldingObjects[listitem][holdingprice];
businessVariables[businessID][bStock]--;
SaveVarBusiness(1,businessID, "Vault",businessVariables[businessID][bVault]);
SaveVarBusiness(1,businessID, "Stock",businessVariables[businessID][bStock]);
GivePlayerCash(playerid, -HoldingObjects[listitem][holdingprice]);
PlayerToyInfo[playerid][slotselection[playerid]][ptModelID] = HoldingObjects[listitem][holdingmodelid];
new modelid = PlayerToyInfo[playerid][slotselection[playerid]][ptModelID];
if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.9;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.35;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if(modelid >= 18891 && modelid <= 18910)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.15;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if(modelid >= 18926 && modelid <= 18935)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if(modelid >= 18911 && modelid <= 18920)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.035;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if(modelid == 19078 || modelid == 1907
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 16;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 6;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else if(modelid == 19317)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.079;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = -0.10;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.09;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 30.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
else
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1;
}
format(string, sizeof(string), "* Compraste un %s por $%d (Slot: %d)", HoldingObjects[listitem][holdingmodelname], HoldingObjects[listitem][holdingprice], slotselection[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
SendClientMessageEx(playerid, COLOR_WHITE, "{A2DC35}[TOYS]:{FFFFFF} Usa /toys para editar tus objetos");
GivePlayerCash(playerid,-100);
}
else SendClientMessage(playerid, -1, "Saliste del Catalogo de Toys'");
return 1;
}

Reply
#2

revivo
Reply
#3

Pero muestra la linea del error.
Reply
#4

El pawno deja de funcionar
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)