CMD:crearobjeto(playerid, params[])
{
if(Informacion[playerid][pAdmin] < 4) return 0;
if(sscanf(params,"i",params[0])) return SendClientMessage(playerid, -1, "/CrearObjeto (Utilidad) - /Utilidades");
if(ObjectID >= MAX_OBJETOS) return SendClientMessage(playerid, -1, "No puedes crear mбs objetos.");
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
InformacionO[ObjectID][O_POS][0] = Pos[0];
InformacionO[ObjectID][O_POS][1] = Pos[1];
InformacionO[ObjectID][O_POS][2] = Pos[2]-1.0;
InformacionO[ObjectID][O_ID] = ObjectID;
new ola[16];
switch(params[0])
{
case 1:
{
InformacionO[ObjectID][O_MODEL] = 2814;
InformacionO[ObjectID][O_UTIL] = 1;
format(ola, sizeof(ola), "Pizza");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(2814, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 2:
{
InformacionO[ObjectID][O_MODEL] = 1668;
InformacionO[ObjectID][O_UTIL] = 2;
format(ola, sizeof(ola), "Agua");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(1668, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 3:
{
InformacionO[ObjectID][O_MODEL] = 1580;
InformacionO[ObjectID][O_UTIL] = 3;
format(ola, sizeof(ola), "Botiquin");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(1580, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 4:
{
InformacionO[ObjectID][O_MODEL] = 3026;
InformacionO[ObjectID][O_UTIL] = 4;
format(ola, sizeof(ola), "Mochila chica");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(3026, Pos[0], Pos[1], Pos[2]-1.0, -90.00000, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 5:
{
InformacionO[ObjectID][O_MODEL] = 371;
InformacionO[ObjectID][O_UTIL] = 5;
format(ola, sizeof(ola), "Mochila mediana");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(371, Pos[0], Pos[1], Pos[2]-1.0, -90.00000, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 6:
{
InformacionO[ObjectID][O_MODEL] = 1310;
InformacionO[ObjectID][O_UTIL] = 6;
format(ola, sizeof(ola), "Mochila grande");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(1310, Pos[0], Pos[1], Pos[2]-1.0, 90.00000, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 7:
{
InformacionO[ObjectID][O_MODEL] = 1650;
InformacionO[ObjectID][O_UTIL] = 7;
format(ola, sizeof(ola), "Bidon");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(1650, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 8:
{
InformacionO[ObjectID][O_MODEL] = 1650;
InformacionO[ObjectID][O_UTIL] = 8;
format(ola, sizeof(ola), "Bidon");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(1650, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 9:
{
InformacionO[ObjectID][O_MODEL] = 2856;
InformacionO[ObjectID][O_UTIL] = 9;
format(ola, sizeof(ola), "Cajas de leche");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(2856, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
case 10:
{
InformacionO[ObjectID][O_MODEL] = 2647;
InformacionO[ObjectID][O_UTIL] = 10;
format(ola, sizeof(ola), "Soda");
InformacionO[ObjectID][O_NAME] = ola;
Objeto[ObjectID] = CreateDynamicObject(2647, Pos[0], Pos[1], Pos[2]-1.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0, 50.0);
}
}
new asd[128];
format(asd, sizeof(asd), "{007200}%s\n{007200}Preciona '{00C3EA}AltIzq{007200}' para recoger",InformacionO[ObjectID][O_NAME]);
LabelObj[ObjectID] = CreateDynamic3DTextLabel(asd, -1, InformacionO[ObjectID][O_POS][0],InformacionO[ObjectID][O_POS][1],InformacionO[ObjectID][O_POS][2], 5.0);
ActualizarObjeto(ObjectID);
Iter_Add(iObjetos, ObjectID);
ObjectID++;
return 1;
}
C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(357) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(366) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(374) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(382) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(390) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(39 : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(406) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(414) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(422) : error 047: array sizes do not match, or destination array is too small C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ZombieSV.pwn(430) : error 047: array sizes do not match, or destination array is too small Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors. |
enum InfoObjetos
{
O_NAME[32],
O_ID,
O_MODEL,
O_UTIL,
Float:O_POS[3]
};
new InformacionO[MAX_OBJETOS][InfoObjetos];
format(InformacionO[ObjectID][O_NAME],32,"string");