#1

O que ta errado nessa porcaria:
PHP код:
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9434) : warning 202number of arguments does not match definition
C
:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9434) : warning 202number of arguments does not match definition
C
:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9434) : warning 202number of arguments does not match definition
C
:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9434) : warning 202number of arguments does not match definition
C
:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9435) : error 035argument type mismatch (argument 1)
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Fire\gamemodes\BPS.pwn(9449) : error 017undefined symbol "caixa"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Comando:
Код:
CMD:mochila(playerid, params[])
{
	if (!gPlayerLogged[playerid])
		return SendClientMessage(playerid, COLOR_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];
		format(string, sizeof(string), "* %s abriu sua mochila!", NomePlayer(playerid));
		SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		ShowMochila(playerid, PlayerInfo[playerid][pMochila]);
		Sound(playerid, 1039, 30.0);
		ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",0,1,0,0,0,0,0);
		caixa[playerid] = CreatePlayerObject(playerid,0, 2359, 1, 0.502411, 0.695765, 0.168214, 100.083671, 32.116867, 1.769900, 1.016777, 1.000000, 1.559558);
		AttachObjectToPlayer(caixa, playerid,1.5, 0.5, 0.0, 0.0, 1.5, 2);
		new Str[45];
		format(Str, 45, "~y~1");
		PlayerTextDrawSetString(playerid, moList1[playerid], Str);
		format(Str, 45, "2");
		PlayerTextDrawSetString(playerid, moList2[playerid], Str);
		format(Str, 45, "3");
		PlayerTextDrawSetString(playerid, moList3[playerid], Str);
		format(Str, 45, "4");
		PlayerTextDrawSetString(playerid, moList4[playerid], Str);
		Inventario[playerid] = 1;
	}
	else
		ClearAnimations(playerid);
	 	DestroyPlayerObject(playerid, caixa);
	    HideMochila(playerid);
	return true;
}
Linhas:
9434
Код:
caixa[playerid] = CreatePlayerObject(playerid,0, 2359, 1, 0.502411, 0.695765, 0.168214, 100.083671, 32.116867, 1.769900, 1.016777, 1.000000, 1.559558);
9435
Код:
AttachObjectToPlayer(caixa, playerid,1.5, 0.5, 0.0, 0.0, 1.5, 2);
9449
Код:
DestroyPlayerObject(playerid, caixa);
Reply
#2

Tente colocar new caixa[MAX_PLAYERS];
Reply
#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
#4

Quote:

new caixa[MAX_PLAYERS];
caixa[playerid] = CreatePlayerObject(playerid, modelid, X, Y, Z, rX, rY, rZ, FloatrawDistance = 0.0);

new caixinha;
caixinha=CreateObject(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
AttachObjectToPlayer(caixinha , playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);

https://sampwiki.blast.hk/wiki/CreatePlayerObject
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)