Erros
#3

Tenta ae e me diz se funcionou!

PHP код:
new caixa[MAX_PLAYERS];//Coloca no inicio da sua GM
CMD:mochila(playeridparams[])
{
    if(!
gPlayerLogged[playerid]) return SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo estб logado !");
    if(
PlayerInfo[playerid][pJailed] == 9)
    {
        
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
         return 
true;
      }
    if(!
GetPVarInt(playerid"vMochila"))
    {
        new 
string[128];
        
//new caixa[MAX_PLAYERS];//Nota que aqui vc tem um vetor! e ele deve ser declarado no inicio da sua GM!
        
format(stringsizeof(string), "* %s abriu sua mochila!"NomePlayer(playerid));
        
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        
ShowMochila(playeridPlayerInfo[playerid][pMochila]);
        
Sound(playerid103930.0);
        
ApplyAnimation(playerid"BOMBER","BOM_Plant_Loop",0,1,0,0,0,0,0);
        
caixa[playerid] = CreatePlayerObject(playerid,0235910.5024110.6957650.168214100.08367132.1168671.7699001.0167771.0000001.559558);
        
AttachObjectToPlayer(caixa[playerid], playerid,1.50.50.00.01.52); //Declara o id da caixa
        
new Str[45];
        
format(Str45"~y~1");
        
PlayerTextDrawSetString(playeridmoList1[playerid], Str);
        
format(Str45"2");
        
PlayerTextDrawSetString(playeridmoList2[playerid], Str);
        
format(Str45"3");
        
PlayerTextDrawSetString(playeridmoList3[playerid], Str);
        
format(Str45"4");
        
PlayerTextDrawSetString(playeridmoList4[playerid], Str);
        
Inventario[playerid] = 1;
    }
    else
// Tem este else entгo esta faltando as { } ou caso esta funзхes abaixo nгo seja o esle de cima, delete-o
    
{
        
ClearAnimations(playerid);
         
DestroyPlayerObject(playeridcaixa[playerid]);//Entгo aqui vc deve utilizar caixa[playerid]
        
HideMochila(playerid);
    }
    return 
true;

Reply


Messages In This Thread
Erros - by MtPlayerZ - 14.07.2017, 17:02
Re: Erros - by NATANGameron - 14.07.2017, 17:14
Re: Erros - by AdrianoStk - 14.07.2017, 17:48
Re: Erros - by DogMal - 14.07.2017, 17:51

Forum Jump:


Users browsing this thread: 2 Guest(s)