Jump to content
  • 0

Problema comanda /skin


Question

Posted

Problema intalnita (descriere): Nu functioneaza comanda. Imi da skin 0 ( CJ ) daca pun "space" dupa "/skin" zice " Unknown command " si daca nu pun,zice " Usage: /skin [id] ",dar daca pun id,nu merge.
Ero(area / rile) / warning-(ul / urile):

Liniile de cod / sursa / script-ul: -

 

if (strcmp("/skin", cmdtext, true, 10) == 0)

    {
        new tmp[256];
        tmp = strtok ( cmdtext, idx );
        if ( !strlen ( tmp ) )
        {
            SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]");
            return 1;
  }
        SetPlayerSkin(playerid, strval(tmp));
        // Do something here
        return 1;
    }
    return 0;
}

Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.Nu reusesc.

3 answers to this question

Recommended Posts

  • 0
Posted

Foloseste ZCMD e mult mai simplu... il gasesti aici

 

Comanda ta v-a fi ceva de gen:

 

CMD:skin(playerid,params[])

{

new skin;

if(sscanf(params,"d",skin)) return SendClientMessage(playerid,-1,"Usage: /Skin [skinID]");

if(skin > 299 || skin < 0) return SendClientMessage(playerid,-1,"ERROR: The skin must be between 0 and 229!");

SetPlayerSkin(playerid,skin);

SendClientMessage(playerid,-1,"Have fun with your new skin!");

return 1;

}

  • Upvote 1
public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

  • 0
Posted

Problema este la setplayrrskin trebuie din asa

 

if (strcmp("/skin", cmdtext, true, 10) == 0)

{

new tmp[256];

tmp = strtok ( cmdtext, idx );

if ( !strlen ( tmp ) )

{

SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]");

return 1;

}

SetPlayerSkin(playerid, strval(tmp));

// Do something here

return 1;

}

return 0;

}

trebuie sa pui asa

 

if (strcmp("/skin", cmdtext, true, 10) == 0)

{

new tmp[256];

tmp = strtok ( cmdtext, idx );

if ( !strlen ( tmp ) )

{

SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]");

return 1;

}

SetPlayerSkin(playerid, tmp);

// Do something here

return 1;

}

return 0;

}

  • Upvote 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.