30.09.2012, 17:02
pawn Код:
CMD:wear( playerid, params[] )
{
/*
Slot 0 - Hats, caps.
*/
if( strcmp( params, "policecap", false ) == 0 )
{
if( plStats [ playerid ] [ HasAPoliceCap ] == 1 )
{
SetPlayerAttachedObject( playerid, 0, 18636, 2 );
EditAttachedObject( playerid, 0 );
}
else return ShowPlayerErrorMessage( playerid, "You don't have a \"Police Cap\"!" );
}
if( strcmp( params, "beret", false ) == 0 )
{
new
colour [ 32 ];
strdel( params, 0, 5 );
if( sscanf( params, "s[32]", colour ) )
return SendClientMessage( playerid, Colour_RankOrange, "HELP: "#Int_White"/wear beret [ colour (red, black, blue, army) ]" );
if( strcmp( colour, "red", false ) == 0 )
{
SetPlayerAttachedObject( playerid, 0, 18922, 2 );
EditAttachedObject( playerid, 0 );
}
else return ShowPlayerErrorMessage( playerid, "Invalid colour!" );
}
return true;
}